<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Import on Blog GoHugo de Fredô : Linux, Proxmox, IA, Trail, Course, Randonnée, Gravel, Ski de Randonnée</title>
    <link>https://move.cyber-neurones.org/tags/import/</link>
    <description>Recent content in Import on Blog GoHugo de Fredô : Linux, Proxmox, IA, Trail, Course, Randonnée, Gravel, Ski de Randonnée</description>
    <generator>Hugo</generator>
    <language>fr</language>
    <lastBuildDate>Mon, 13 Apr 2020 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://move.cyber-neurones.org/tags/import/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>ENEDIS : Migration des données  pour une utilisation dans Mariadb / Grafana (fait en Python)</title>
      <link>https://move.cyber-neurones.org/post/2020/04/2020-04-13-enedis-migration-des-donnees-pour-une-utilisation-dans-mariadb-grafana-fait-en-python/</link>
      <pubDate>Mon, 13 Apr 2020 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2020/04/2020-04-13-enedis-migration-des-donnees-pour-une-utilisation-dans-mariadb-grafana-fait-en-python/</guid>
      <description>&lt;p&gt;Je viens de faire un nouveau programme en Python afin de mettre les données de &lt;strong&gt;ENEDIS&lt;/strong&gt; sur MariaDB &amp;amp; Python. Pour avoir les données de &lt;strong&gt;ENEDIS&lt;/strong&gt; il faut aller sur &lt;a href=&#34;https://mon-compte-particulier.enedis.fr/home-connectee&#34;&gt;https://mon-compte-particulier.enedis.fr/home-connectee&lt;/a&gt;/ et se faire un compte. Puis relier ce compte à la facture EDF &amp;hellip; Je vais pas vous mentir c&amp;rsquo;est un peu de parcours du combattant. J&amp;rsquo;ai du faire appel à plusieurs fois au support afin que le lien puisse se faire. Misère.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to import data of Wordpress (Feed RSS) to Joplin ?</title>
      <link>https://move.cyber-neurones.org/post/2019/02/2019-02-12-how-to-import-data-of-wordpress-feed-rss-to-joplin/</link>
      <pubDate>Tue, 12 Feb 2019 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2019/02/2019-02-12-how-to-import-data-of-wordpress-feed-rss-to-joplin/</guid>
      <description>&lt;p&gt;Install JOPLIN : &lt;a href=&#34;https://joplin.cozic.net&#34;&gt;https://joplin.cozic.net ,&lt;/a&gt;  and start REST API. (Easy)&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 1 :&lt;/strong&gt; Put this script in folder.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; : Edit the script and put your token &lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt; : Run the script&lt;/p&gt;&#xA;&lt;p&gt;The script :&lt;/p&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#&#xA;# Version 1 &#xA;# for Python 3&#xA;# &#xA;#   ARIAS Frederic&#xA;#   Sorry ... It&amp;#39;s difficult for me the python :)&#xA;#&#xA;&#xA;import feedparser&#xA;from os import listdir&#xA;from pathlib import Path&#xA;import glob&#xA;import csv&#xA;import locale&#xA;import os&#xA;import time&#xA;from datetime import datetime&#xA;import json&#xA;import requests&#xA;&#xA;#Token&#xA;ip = &amp;#34;127.0.0.1&amp;#34;&#xA;port = &amp;#34;41184&amp;#34;&#xA;token = &amp;#34;Put your token here&amp;#34;&#xA;&#xA;nb_import = 0;&#xA;headers = {&amp;#39;Content-type&amp;#39;: &amp;#39;application/json&amp;#39;, &amp;#39;Accept&amp;#39;: &amp;#39;text/plain&amp;#39;}&#xA;&#xA;url_notes = (&#xA;    &amp;#34;http://&amp;#34;+ip+&amp;#34;:&amp;#34;+port+&amp;#34;/notes?&amp;#34;&#xA;    &amp;#34;token=&amp;#34;+token&#xA;)&#xA;url_folders = (&#xA;    &amp;#34;http://&amp;#34;+ip+&amp;#34;:&amp;#34;+port+&amp;#34;/folders?&amp;#34;&#xA;    &amp;#34;token=&amp;#34;+token&#xA;)&#xA;url_tags = (&#xA;    &amp;#34;http://&amp;#34;+ip+&amp;#34;:&amp;#34;+port+&amp;#34;/tags?&amp;#34;&#xA;    &amp;#34;token=&amp;#34;+token&#xA;)&#xA;url_ressources = (&#xA;    &amp;#34;http://&amp;#34;+ip+&amp;#34;:&amp;#34;+port+&amp;#34;/ressources?&amp;#34;&#xA;    &amp;#34;token=&amp;#34;+token&#xA;)&#xA;&#xA;#Init&#xA;Wordpress_UID = &amp;#34;12345678901234567801234567890123&amp;#34;&#xA;UID = {}&#xA;&#xA;payload = {&#xA;    &amp;#34;id&amp;#34;:Wordpress_UID,&#xA;    &amp;#34;title&amp;#34;:&amp;#34;Wordpress Import&amp;#34;&#xA;}&#xA;&#xA;try:&#xA;    resp = requests.post(url_folders, data=json.dumps(payload, separators=(&amp;#39;,&amp;#39;,&amp;#39;:&amp;#39;)), headers=headers)&#xA;    resp.raise_for_status()&#xA;    resp_dict = resp.json()&#xA;    print(resp_dict)&#xA;    print(&amp;#34;My ID&amp;#34;)&#xA;    print(resp_dict[&amp;#39;id&amp;#39;])&#xA;    Wordpress_UID_real = resp_dict[&amp;#39;id&amp;#39;]&#xA;    save = str(resp_dict[&amp;#39;id&amp;#39;])&#xA;    UID[Wordpress_UID]= save&#xA;except requests.exceptions.HTTPError as e:&#xA;    print(&amp;#34;Bad HTTP status code:&amp;#34;, e)&#xA;except requests.exceptions.RequestException as e:&#xA;    print(&amp;#34;Network error:&amp;#34;, e)&#xA;&#xA;feed = feedparser.parse(&amp;#34;https://www.cyber-neurones.org/feed/&amp;#34;)&#xA;&#xA;feed_title = feed[&amp;#39;feed&amp;#39;][&amp;#39;title&amp;#39;]&#xA;feed_entries = feed.entries&#xA;&#xA;numero = -2&#xA;nb_entries = 1&#xA;nb_metadata_import = 1&#xA;&#xA;while nb_entries &amp;gt; 0 : &#xA;  print (&amp;#34;----- Page &amp;#34;,numero,&amp;#34;-------&amp;#34;)&#xA;  numero += 2&#xA;  url = &amp;#34;https://www.cyber-neurones.org/feed/?paged=&amp;#34;+str(numero)&#xA;  feed = feedparser.parse(url)&#xA;  feed_title = feed[&amp;#39;feed&amp;#39;][&amp;#39;title&amp;#39;]&#xA;  feed_entries = feed.entries&#xA;  nb_entries = len(feed[&amp;#39;entries&amp;#39;])&#xA;  for entry in feed.entries:&#xA;     nb_metadata_import += 1&#xA;     my_title = entry.title&#xA;     my_link = entry.link&#xA;     article_published_at = entry.published # Unicode string&#xA;     article_published_at_parsed = entry.published_parsed # Time object&#xA;     article_author = entry.author&#xA;     timestamp = time.mktime(entry.published_parsed)*1000&#xA;     print(&amp;#34;Published at &amp;#34;+article_published_at)&#xA;     my_body = entry.description&#xA;     payload_note = {&#xA;         &amp;#34;parent_id&amp;#34;:Wordpress_UID_real,&#xA;         &amp;#34;title&amp;#34;:my_title,&#xA;         &amp;#34;source&amp;#34;:&amp;#34;Wordpress&amp;#34;,&#xA;         &amp;#34;source_url&amp;#34;:my_link,&#xA;         &amp;#34;order&amp;#34;:nb_metadata_import,&#xA;         &amp;#34;user_created_time&amp;#34;:timestamp,&#xA;         &amp;#34;user_updated_time&amp;#34;:timestamp,&#xA;         &amp;#34;author&amp;#34;:article_author,&#xA;         &amp;#34;body_html&amp;#34;:my_body&#xA;         }&#xA;     payload_note_put = {&#xA;         &amp;#34;source&amp;#34;:&amp;#34;Wordpress&amp;#34;,&#xA;         &amp;#34;order&amp;#34;:nb_metadata_import,&#xA;         &amp;#34;source_url&amp;#34;:my_link,&#xA;         &amp;#34;user_created_time&amp;#34;:timestamp,&#xA;         &amp;#34;user_updated_time&amp;#34;:timestamp,&#xA;         &amp;#34;author&amp;#34;:article_author&#xA;         }&#xA;&#xA;     try:&#xA;         resp = requests.post(url_notes, json=payload_note)&#xA;         resp.raise_for_status()&#xA;         resp_dict = resp.json()&#xA;         print(resp_dict)&#xA;         print(resp_dict[&amp;#39;id&amp;#39;])&#xA;         myuid= resp_dict[&amp;#39;id&amp;#39;]&#xA;     except requests.exceptions.HTTPError as e:&#xA;         print(&amp;#34;Bad HTTP status code:&amp;#34;, e)&#xA;     except requests.exceptions.RequestException as e:&#xA;         print(&amp;#34;Network error:&amp;#34;, e)&#xA;&#xA;     url_notes_put = (&#xA;    &amp;#34;http://&amp;#34;+ip+&amp;#34;:&amp;#34;+port+&amp;#34;/notes/&amp;#34;+myuid+&amp;#34;?&amp;#34;&#xA;    &amp;#34;token=&amp;#34;+token&#xA;)&#xA;     try:&#xA;         resp = requests.put(url_notes_put, json=payload_note_put)&#xA;         resp.raise_for_status()&#xA;         resp_dict = resp.json()&#xA;         print(resp_dict)&#xA;     except requests.exceptions.HTTPError as e:&#xA;         print(&amp;#34;Bad HTTP status code:&amp;#34;, e)&#xA;     except requests.exceptions.RequestException as e:&#xA;         print(&amp;#34;Network error:&amp;#34;, e)&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Diaro App : DiaroBackup.xml : How to parse in python ? (Draft n°3)</title>
      <link>https://move.cyber-neurones.org/post/2019/02/2019-02-09-diaro-app-diarobackup-xml-how-to-parse-in-python-draft-n3/</link>
      <pubDate>Sat, 09 Feb 2019 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2019/02/2019-02-09-diaro-app-diarobackup-xml-how-to-parse-in-python-draft-n3/</guid>
      <description>&lt;p&gt;(See the finale release : &lt;a href=&#34;https://www.cyber-neurones.org/2019/02/diaro-app-pixel-crater-ltd-diarobackup-xml-how-to-migrate-data-to-joplin/&#34;&gt;https://www.cyber-neurones.org/2019/02/diaro-app-pixel-crater-ltd-diarobackup-xml-how-to-migrate-data-to-joplin/&lt;/a&gt; )&lt;/p&gt;&#xA;&lt;p&gt;Now with release V3, it&amp;rsquo;s possible to import data &amp;hellip; Le last issue is on user_created_time and user_updated_time.&lt;/p&gt;&#xA;&lt;p&gt;The REST API is very good ( &lt;a href=&#34;https://joplin.cozic.net/api/&#34;&gt;https://joplin.cozic.net/api/&lt;/a&gt; ) , but If it&amp;rsquo;s not too complex :&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Add possibility to choose the ID on folder.&lt;/li&gt;&#xA;&lt;li&gt;Add possibility to choose the ID on tags.&lt;/li&gt;&#xA;&lt;li&gt;Add possibility to do PUT on note to add at the end of text : [&lt;code&gt;](:/ID_RESOURCE)&lt;/code&gt;. The syntax : PUT /ressources/ID_RESSOURCE/notes/ID_NOTE?token=…”&lt;/li&gt;&#xA;&lt;li&gt;Possibility to add ID of tags instead text on Notes.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;My last source :&lt;/p&gt;</description>
    </item>
    <item>
      <title>Diaro ( diaroapp.com ) : Import from Awesome Note ( bridworks.com )</title>
      <link>https://move.cyber-neurones.org/post/2018/01/2018-01-06-diaro-diaroapp-com-import-from-awesome-note-bridworks-com/</link>
      <pubDate>Sat, 06 Jan 2018 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2018/01/2018-01-06-diaro-diaroapp-com-import-from-awesome-note-bridworks-com/</guid>
      <description>&lt;p&gt;In my opinion Diaro should do more developments on data imports. Currently, people who change from iPhone to Android are looking for an equivalent of Awesome Note. The problem is nobody import Awesome Note data Backup. In fact before &lt;strong&gt;22/05/2017&lt;/strong&gt; it was impossible because the data was encrypted, now it&amp;rsquo;s totally possible. Each note is a plist file in binary format.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Since the 22/05/2017, it&amp;rsquo;s more easy to have access to the data with Awesome Note :&lt;/strong&gt; &lt;/p&gt;</description>
    </item>
    <item>
      <title>TAPForm : export de Bento vers TAPForm (images incluses)</title>
      <link>https://move.cyber-neurones.org/post/2015/02/2015-02-03-tapform-export-de-bento-vers-tapform-images-incluses/</link>
      <pubDate>Tue, 03 Feb 2015 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2015/02/2015-02-03-tapform-export-de-bento-vers-tapform-images-incluses/</guid>
      <description>&lt;p&gt;Le lien de TAPForm sur l&amp;rsquo;Apple Store : &lt;a href=&#34;https://itunes.apple.com/fr/app/tap-forms-base-de-donnees/id494995266?mt=12&#34;&gt;https://itunes.apple.com/fr/app/tap-forms-base-de-donnees/id494995266?mt=12&lt;/a&gt;. J&amp;rsquo;estime que c&amp;rsquo;est la meilleure alternative à Bento.&lt;/p&gt;&#xA;&lt;h1 id=&#34;solution--n1--pour-utilisateur-de-bento-avec-une-version--40-&#34;&gt;Solution ( n°1 ) pour utilisateur de Bento avec une version &amp;gt;= 4.0 :&lt;/h1&gt;&#xA;&lt;p&gt;Attention : les utilisateurs de la dernière version de Bento peuvent utiliser cette méthode qui est beaucoup plus simple :&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://www.manula.com/manuals/tap-zapp/tap-forms-mac/3/en/topic/bento-template-importer&#34;&gt;http://www.manula.com/manuals/tap-zapp/tap-forms-mac/3/en/topic/bento-template-importer&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Pour voir si vous avez la dernière version il faut faire : Bento -&amp;gt; Fichier -&amp;gt; Exporter -&amp;gt; Modèle (et il faut avoir une case à cocher indiquant d&amp;rsquo;inclure les données).&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
