top | item 39343260

(no title)

whatisyour | 2 years ago

Apart from camera, almost everything is working correctly. Camera doesn't work at all.

https://github.com/linux-surface/linux-surface

I use this kernel, you can use this with most operating systems. Once things are setup, everything is extremely smooth.

I use xournal++ for note writing, and using GNOME is necessary. KDE doesn't have support for screen rotation etc. When you use GNOME, make sure to disable gestures and screen edge detection, because that might occasionally cause interfere with writing.

So, the workflow is quite simple with xournal++, you run a `inotify` based watched which automatically compiles and pushes stuff on every save. I of course assume that only `xournal++` on tab can change those handwritten notes. You can get some fancier git logic if needed. By putting the baselink as `https://gitlab.com/user/repo/-/jobs/artifacts/main/raw`, you can get the list of PDFs directly on readme of your git repo. pretty nifty for referring to later.

    while inotifywait -e modify,create,delete,move $INPUT;
    do
       publish.script --input $INPUT --output $OUTPUT
    done


    # publish.script
    pushd $INPUT
      pushd $INPUT

      printf "# Handwritten Notes\n\n" > readme.md

      printf "|  Index  | Date | Title |\n" >> readme.md
      printf "|   ---   |  --- |  ---  |\n" >> readme.md


      INDEX=0
 
      for i in $(ls -r *.xopp); do
        BASENAME=$(basename $i .xopp)
        PDFNAME=$BASENAME.pdf
        xournalpp --create-pdf=$OUTPUT/$PDFNAME $i

        BASENAME=$(basename $i .xopp)
        PDFNAME=$BASENAME.pdf
        LINK=$BASELINK/$PDFNAME$SUFFIX

        INDEX=$(( INDEX + 1))
        DATE=$(echo ${BASENAME:0:10})

        printf "| %d | %s | [%s](%s) |\n" $INDEX $DATE $BASENAME $LINK >> readme.md

      done

      if [[ $(git diff --stat) != '' ]]; then
        git add .
        git commit -m "$(date)"
        git push
      fi


    popd

You can run the inotify as a `systemd` service

    [Unit]
    Description=Starts Sync Service

    [Service]
    Type=simple
    ExecStart=%%%SYNC_BIN%%% --input %%%INPUT_DIR%%% --output %%%OUTPUT_DIR%%%
    ExecReload=/usr/bin/kill -HUP $MAINPID
    KillMode=process
    TimeoutSec=180
    Restart=on-failure
    RestartSec=5s

    [Install]
    WantedBy=default.target

discuss

order

No comments yet.