Google speech-to-text

If you use Google speech-to-text one problem is to type signs such as ‘(‘ or ‘)’. In English you can say (in a low voice) open bracket or close bracket. In Italian apri parentesi tonda o chiudi parentesi tonda: indeed saying only apri parentesi Google will type “apri parentesi” and not “( “.

convert an ics file to a markdown diary

I. an old solution

Once I thought that the best solution was work with an ics online. The advantage of this is the possibility to access from any device (PC and smartphone). But there were many disadvantages, as I say afterwards.

I keep my previous steps, in casesomeone find it useful.

1) download the ics file

  • sudo apt install python3-pip
  • sudo pip3 install ics
  • create the bash executable file, like this
with google

#!/bin/bash

wget -O diario.ics https://calendar.google.com/calendar/ical/[remote path]/basic.ics

with nextcloud

wget -O diario.ics https://ecloud.global/remote.php/dav/calendars/[vostra user(ad esempio la mail]/personal/?export –user=[il vostro user, come prima]–password=[la vostra password]

2) convert the ics to md

afterwards, after downloading the ics file (in the following example “personal.ics”) you have to concert it to a md file. You can use a code like the folowing, in a python file (we call here “convert-ics.py”) located or linked in the same folder of ics file:

from ics import Calendar

md_template = """
## {name} - {start}
{desc}
{location} 
_{categ}_"""

with open("personal.ics") as f:
   cal = Calendar(f.read())

print("# Diario")
for e in sorted(cal.events):
    print(md_template.format(start=e.begin.strftime("%Y-%m-%e"), name=e.name, 
                             desc=e.description, location=e.location, 
                             categ=e.categories))

and then

python3 convert-ics.py > /[local-path]/local-file.md

II. a new solution: working in local

There were two big disadvantages working on remote

  • the privacy: on a remote server other could see my personal data; in local it is more difficult.
  • the archiving: there was an impossibility to split the “remote” past (and archive it) from the recent one (at least I didn’t find the way to get this possibility).

Both these disadvantages are solved having my personal ics on local: a) the privacy, because in local I am the only allowed to see my data; b) the archiving, because I can split an ics. This second point deserves some explications.

How to split an ics

If you open an ics with a text editor you will see that items are not in cronological order, so splitting an ics to get the new items separated from the old ones is not simple.

Therfore I converted first of all my ics in a csv file, thanks to this (very “customizable”) site website: IndigoBlue. The resulting csv file can be order cronologically and then splitted.

Afterwards you have to convert the csv (splitted) files to ics files: the best website I found is Manas Tungare. It convert perfectly your csv in a ics. Be careful: the date format must be 2021/07/07 and not, i.g., 2021-07-07; read carefully the instructions, in particular the required columns (and its names).

Finally you can convert the ics-archive to markdown, following the above step (convert the ics to md).

III. new perspectives

As long as there are tons of issues with python and the above way to convert an ics to markdown, you could use a new way, quite simple and probably better: convert a csv file to markdown, using a tool like Kate and regex.

speech to text in Linux con KDE connect

If you cannot speak-to-text directly from the smartphone to PC, you can before dictate a text within KDE Connect and then, after, send it to your PC (provided that your smartphone and your PC are both connected with KDE Connect):

KDE Connect (on smartphone) – > remote input -> small icon on high, as below

Then choose as keyboard, Google Voice Typing

Then you will be able to dictate your text (seeing it, before, on the smartphone [KDE connect] screen) and send it to your Desktop device.

siti web

Triste destino, quello dei siti web: schiacciati come sono da un lato da google, che come un rullo compressore azzera i siti e fa figurare le loro pagine come parte di un unico, grande web, e dall’altro dai social networks. Chi visita un sito? Si usa e getta la pagina che serve, trovata grazie a Google e poi via, su Facebook o Twitter, a leggere le ultime stronzate sparate da illustri nessuno. Ma tant’è… è il web 2.0. Anzi ci dicono che sta arrivando il web 3.0 …

alternative a igoogle

Conoscete igoogle? Se non lo conoscete vi perdete molto, per navigare in internet. Se lo conoscete, sapete che chiuderà a novembre (sì: 2013) e starete cercando uan alternativa. Ne ho provate alcune e la migliore direi proprio che è ighome.com. Fa praticamente (quasi) tutto quello che fa igoogle. Provatelo!