PumpkinDrama

joined 2 years ago
MODERATOR OF
 

Here are several Markdown viewer options for Linux, ranging from simple dedicated viewers to terminal-based tools and editors with built-in preview. I’ve grouped them by type so you can choose based on how you want to use them:


Standalone Markdown Viewers (Lightweight, GUI)

MarkLite

  • Lightweight markdown viewer with optional editing.
  • Opens directly in viewer mode; you can also switch to edit. (MarkLite)

markdown-reader

  • Minimal Qt5-based Markdown viewer.
  • Fast start, image caching, simple file navigation. (PyPI)

mdview

  • Standalone viewer that only renders Markdown (no heavy editor features).
  • Available as AppImage or snap for easy installation. (AppImages)

Terminal-Based Markdown Viewers

These are excellent if you prefer working in a terminal or want a very lightweight solution:

Glow

  • Renders Markdown nicely in the terminal with a TUI.
  • Allows browsing local files and styled output. (GitHub)

Frogmouth

  • Terminal Markdown browser/viewer with navigation, history, table of contents. (GitHub)

mandown

  • Man-page inspired Markdown viewer that feels like man. (Terminal Trove)

AMD Reader

  • Python/Textual-based Markdown terminal viewer with navigation. (PyPI)

Editors with Built-In Live Preview

These are general editors or note apps that also work as Markdown viewers:

Typora

  • Live rendered preview while you edit.
  • Popular choice if you want GUI reading + writing. (Markdown Viewer Online)

Mark Text

VS Code

  • Full code editor with Markdown preview pane (Ctrl+Shift+V).
  • Ideal if you already use it for development. (Markdown Viewer Online)

Zettlr

  • Markdown editor with preview and additional writing tools (citation support, docs). (Wikipedia)

Installation Hints (General)

  • AppImage (like mdview): Just download, make executable, run. (AppImages)

  • Snap (mdview, Glow, others):

    sudo snap install <package>
    
 (if snapd is set up) :contentReference[oaicite:12]{index=12}  
- **Package managers / pipx** (Glow, markdown-reader, AMD Reader):  
 ```bash
 pipx install glow
 pipx install markdown-reader
 pipx install amdreader

(or via distro repositories if available) (GitHub)


Choosing the Right Tool

  • Just view Markdown, minimal overhead: Terminal tools like Glow, Frogmouth, mandown.
  • Simple GUI viewer: marklite, markdown-reader, mdview.
  • Preview + editing: Typora, Mark Text, VS Code.
 

On Linux, the most reliable and widely used approach is to use Pandoc. It natively understands Markdown, EPUB structure, and chapter boundaries.

Below is a production-grade workflow.


Recommended Tooling

  • pandoc (core conversion engine)

  • Optional:

    • GNU Make (automation)
    • CSS (styling)
    • YAML metadata file (EPUB metadata)

Install Pandoc:

sudo apt install pandoc
# or
sudo dnf install pandoc
# or
sudo pacman -S pandoc

Basic Concept (How Chapters Work)

Pandoc treats each input Markdown file as a separate section. When generating EPUB:

  • Each file becomes a chapter.
  • Top-level headings (# Heading) become chapter titles.
  • File order determines chapter order.

Minimal Example

Assume this structure:

book/
├── chapter01.md
├── chapter02.md
├── chapter03.md

Create the EPUB:

pandoc chapter01.md chapter02.md chapter03.md \
  -o book.epub

That is sufficient for a valid EPUB with three chapters.


Best-Practice Structure (Recommended)

1. Use Proper Headings

Each chapter file should start with a level-1 heading:

# Chapter 1: Introduction

Your content here…

Pandoc uses this for the EPUB table of contents.


2. Add Metadata (Title, Author, Language)

Create metadata.yaml:

title: "My Book Title"
creator:
  - role: author
    text: "Author Name"
language: en
identifier: urn:uuid:12345678-1234-5678-1234-567812345678

Then run:

pandoc metadata.yaml chapter01.md chapter02.md chapter03.md \
  -o book.epub

Styling the EPUB (CSS)

Create epub.css:

body {
  font-family: serif;
  line-height: 1.5;
}

h1 {
  page-break-before: always;
}

Generate EPUB with styling:

pandoc metadata.yaml chapter01.md chapter02.md chapter03.md \
  --css=epub.css \
  -o book.epub

Automatic Chapter Ordering

If you have many files:

pandoc metadata.yaml $(ls chapters/*.md | sort) \
  -o book.epub

Or explicitly:

pandoc metadata.yaml chapters/01-*.md chapters/02-*.md \
  -o book.epub

Advanced Options (Commonly Used)

Table of Contents Depth

--toc --toc-depth=2

Cover Image

--epub-cover-image=cover.jpg

Split Chapters by Heading (Single File Input)

If you later combine files:

--split-level=1

Validating the EPUB (Optional but Recommended)

Install epubcheck:

sudo apt install epubcheck

Validate:

epubcheck book.epub

Summary

Shortest correct answer:

pandoc *.md -o book.epub

Best practice:

  • One Markdown file per chapter
  • Each file starts with # Chapter Title
  • Use a YAML metadata file
  • Add CSS for layout consistency
[–] PumpkinDrama@reddthat.com 1 points 2 days ago* (last edited 2 days ago) (1 children)

This should be a user setting. Finding an instance is already hard enough with all the politicking and bans between instances. It shouldn’t be made even harder by turning these into instance-level settings instead of user-level ones.

[–] PumpkinDrama@reddthat.com -1 points 2 days ago (4 children)

I think PieFed should allow disabling down-votes. I genuinely dislike seeing down-votes, especially on my own content. I behave very differently on platforms like Bluesky that only have like/repost, compared to Lemmy, where saying something unpopular results in down-votes that feel like a punch in the gut. In real life, if someone disagrees, they either tell you or disengage. On PieFed, down-votes go further, they actively suppress your voice so others don’t see it. That is effectively what down-votes accomplish, and I don’t think it leads to healthier discussion.

[–] PumpkinDrama@reddthat.com 1 points 4 days ago* (last edited 4 days ago)

https://lemmy.ml/comment/5593416

#!/bin/sh
# Select a file with fzf from a database sorted by frecency and open it using
# xdg-open. frece can be found at https://github.com/YodaEmbedding/frece

DB_FILE=${FRECE_FILES_DB:-$HOME/.cache/frecent-files.csv}
item=$(frece print "$DB_FILE" | fzf --tiebreak=index --scheme=path)

[ -z "$item" ] &amp;&amp; exit 1
frece increment "$DB_FILE" "$item"

xdg-open "$item"

#!/bin/sh
# Update frece database

DB_FILE=${FRECE_FILES_DB:-$HOME/.cache/frecent-files.csv}
tmp_file=$(mktemp)
fd -H . ~ > "$tmp_file"  # use ~/.fdignore file to exclude certain dirs
frece update "$DB_FILE" "$tmp_file" --purge-old
rm "$tmp_file"
 

I hear then connect through the earphones as always but then every other sound is played by the phone's speaker. I've tried reconnecting and rebooting them a few times without luck. Any suggestions?

Edit: rebooting the phone solved it.

 

I haven’t voted in years after reading the argument that voting mainly serves to slot you into a cohort, making it easier for governments and corporations to profile you. Recently I heard someone argue the opposite angle: don’t vote because none of the politicians deserve you. A comedian mocked that stance as basically holding your breath when you are angry.

Now I’m conflicted because both arguments feel compelling in different ways. What are your strongest arguments for voting, or against voting?

[–] PumpkinDrama@reddthat.com -1 points 1 week ago

The government only released a modeled video and a book to prove their story why should anyone bother with something that's clearly fake.

 
 
 
[–] PumpkinDrama@reddthat.com 24 points 1 week ago (5 children)

Is it indie if the creators can be laid off? That's a head scratcher.

[–] PumpkinDrama@reddthat.com 4 points 1 week ago (3 children)

This seems like overcompensating for the child limit. Are they going to be like a yoyo, swinging from one extreme to the other until they find a balance, like all things should be?

[–] PumpkinDrama@reddthat.com -1 points 1 week ago* (last edited 1 week ago) (1 children)

Or maybe somewhere where you don't have to spend half of your salary paying rent? Like China.

[–] PumpkinDrama@reddthat.com -2 points 1 week ago (3 children)

Imperialist shill.

 

I believe I heard something about Maria Teresa not treating his patients and telling them pain were caresses from the lord or something like that and moving donations to private accounts.

 

Below is a comprehensive, practical process to automatically track your most-used files on Manjaro Linux and sync those under 1 MB to a USB drive when it’s plugged in, filling the USB to ~80 % capacity. This solution uses common Linux tools, udev for USB detection, scripting for file tracking, and rsync for copying.


Overview of the Solution

  1. Track file usage (access frequency) on your system.
  2. Maintain a ranked list of most-used files.
  3. On USB insertion, compute a target 80 % capacity size.
  4. Select top files under 1 MB from the usage list until the target capacity.
  5. Copy those files to the USB.

Components

  • File usage tracker → logs accessed files.
  • Usage database → tracks frequency and last access times.
  • udev rule → triggers sync on USB mount.
  • Sync script → selects and copies files to USB.

Assumptions

  • You are on Manjaro Linux (Arch-based).
  • You have bash, inotifywait (from inotify-tools), rsync, and standard coreutils.
  • USB mountpoints are under /run/media/$USER/<label> (common on Manjaro with udisks2/GUI auto-mounting). If you auto-mount elsewhere, you can adjust.

Part 1 — Track File Access

We want a daemon that logs the files you use. The simplest reliable metric is file opens.

  1. Install required tool
sudo pacman -S inotify-tools
  1. Create a tracker script

Create /usr/local/bin/file_usage_tracker.sh:

#!/usr/bin/env bash

# Scan common directories to watch — adjust to your needs.
WATCH_DIRS=("$HOME" "/etc" "/usr/local/bin")

# DB file
DB="$HOME/.file_usage.db"
mkdir -p "$(dirname "$DB")"
touch "$DB"

# Function logs file open events
inotifywait -m -e open --format '%w%f' "${WATCH_DIRS[@]}" | while read path; do
    # Only record real files
    if [ -f "$path" ]; then
        # Increase count with timestamp
        echo "$(date +%s) $path" >> "$DB"
    fi
done
  1. Make it executable
sudo chmod +x /usr/local/bin/file_usage_tracker.sh
  1. Run it on login

Use a systemd user service:

~/.config/systemd/user/file_usage_tracker.service

[Unit]
Description=Track file opens

[Service]
ExecStart=/usr/local/bin/file_usage_tracker.sh
Restart=always

[Install]
WantedBy=default.target

Enable it:

systemctl --user daemon-reload
systemctl --user enable --now file_usage_tracker.service

This now appends every file open to a per-user DB (simple flat log). We will process it later.


Part 2 — Create a Ranked File List

We must convert the raw log into a frequency list of files, excluding those >1 MB.

Create /usr/local/bin/file_usage_rank.sh:

#!/usr/bin/env bash

DB="$HOME/.file_usage.db"
RANKED="$HOME/.file_usage_ranked.tsv"

# Remove non-existent paths
grep -v -E '^\s*$' "$DB" | awk '{print $2}' | sort | uniq -c | \
    sort -nr > /tmp/usage.tmp

# Emit TSV: count<TAB>path
awk '{printf "%d\t%s\n", $1, $2}' /tmp/usage.tmp > "$RANKED"
rm /tmp/usage.tmp

Make executable:

sudo chmod +x /usr/local/bin/file_usage_rank.sh

You can run this periodically (e.g., daily cron or systemd timer) so the ranked list stays up to date.


Part 3 — USB Sync Script

This script is triggered on USB insertion.

Save as /usr/local/bin/usb_sync_most_used.sh:

#!/usr/bin/env bash

# Mount point argument
MOUNTPOINT="$1"
USER_HOME="$HOME"

# Location of ranked file list
RANKED="$USER_HOME/.file_usage_ranked.tsv"
TARGET_DIR="$MOUNTPOINT/most_used_files"

# Fail if missing
[ -f "$RANKED" ] || exit 1

# Compute target size (80%)
TOTAL_BYTES=$(df --output=size -B1 "$MOUNTPOINT" | tail -n1)
TARGET_BYTES=$(( TOTAL_BYTES * 80 / 100 ))

# Prepare
mkdir -p "$TARGET_DIR"
rm -rf "${TARGET_DIR:?}/"*   # clear old

ACCUM=0

# Select files
while IFS=$'\t' read -r count path; do
    # stop if target reached
    [ "$ACCUM" -ge "$TARGET_BYTES" ] && break

    # skip if >1MB or missing/not regular
    if [ -f "$path" ] && [ "$(stat -c%s "$path")" -le 1048576 ]; then
        FILESIZE=$(stat -c%s "$path")
        ACCUM=$((ACCUM + FILESIZE))
        echo "Queue $path ($FILESIZE bytes)"
        echo "$path"
    fi
done < "$RANKED" | while read file; do
    # use rsync to copy while preserving structure
    REL="${file#$HOME/}"
    DEST="$TARGET_DIR/$REL"
    mkdir -p "$(dirname "$DEST")"
    rsync -a --relative "$file" "$TARGET_DIR"
done

Make executable:

sudo chmod +x /usr/local/bin/usb_sync_most_used.sh

Part 4 — udev Rule to Trigger Sync

You want the script to run when a USB is plugged in and mounted. Writing udev directly for sync is fragile because mount may not be ready.

Better: use a udev rule that invokes a systemd service once the block device appears.

  1. Create a udev rule:

/etc/udev/rules.d/99-usb-sync.rules

ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_TYPE}!="", RUN+="/usr/bin/systemd run usb_sync@%k.service"
  1. Create a systemd template:

/etc/systemd/system/usb_sync@.service

[Unit]
Description=Sync Most Used Files for USB %I
After=local-fs.target

[Service]
Type=oneshot
Environment="MOUNTDEV=%I"
ExecStart=/usr/local/bin/usb_sync_udev_wrapper.sh "%I"
  1. Create the wrapper to find mountpoint:

/usr/local/bin/usb_sync_udev_wrapper.sh

#!/usr/bin/env bash

DEVNAME="$1"
# Wait up to 10s for mount
for i in {1..10}; do
    MOUNT=$(lsblk -o MOUNTPOINT -nr /dev/"$DEVNAME" | head -n1)
    [ -n "$MOUNT" ] && break
    sleep 1
done

[ -n "$MOUNT" ] && /usr/local/bin/usb_sync_most_used.sh "$MOUNT"

Make exec:

sudo chmod +x /usr/local/bin/usb_sync_udev_wrapper.sh
  1. Reload:
sudo udevadm control --reload
sudo systemctl daemon-reload

How It Works

  • The tracker logs all file opens.

  • The rank script builds a sorted list by usage count.

  • When any USB block device is plugged in:

    • The udev rule triggers a systemd run service.
    • The wrapper waits until the device is mounted.
    • The sync script reads the ranked list, selects files ≤1 MB and copies them up to ~80 % of USB capacity.

Optional Improvements

  • Exclude certain directories from tracking (e.g., /proc, caches).
  • Blacklist file types (e.g., temp or large binaries).
  • Exclude duplicates by content hash.
  • Add logging for audit and error tracking.

Notes

  • This approach features a simple access tracker rather than kernel tracing.
  • The sync happens for any USB filesystem with an ID_FS_TYPE, so you can whitelist by vendor ID if needed.
  • Ensure your tracker doesn’t impact performance by adjusting watch dirs.
[–] PumpkinDrama@reddthat.com 0 points 2 weeks ago (1 children)

Maybe don't stick your nose where it isn't asked, you're not a mod here.

 

El “método LPR 2R” se utiliza en contextos de estudio estructurado y suele describirse como una secuencia de pasos que favorecen la comprensión profunda y la retención. Aunque existen variaciones en el nombre, suele componerse de las siguientes fases:

1. L – Lectura inicial Realiza una lectura completa y sin interrupciones del material. El objetivo es obtener una visión general del contenido, sus temas clave y su estructura. No intentes memorizar todavía; céntrate en entender el panorama.

2. P – Pregunta Formula preguntas sobre lo que acabas de leer. Pueden ser del tipo: – ¿Cuál es el concepto principal? – ¿Por qué ocurre esto? – ¿Cómo se relaciona con otros temas? – ¿Qué podría preguntarme un examen sobre este contenido? Las preguntas activan el pensamiento crítico y facilitan el procesamiento activo de la información.

3. R – Respuesta (la primera R) Responde las preguntas sin mirar el texto. Esto obliga a recuperar la información desde la memoria, lo cual fortalece el aprendizaje. Si no recuerdas algo, vuelve al material y revisa únicamente el punto necesario.

4. R – Repetición (la segunda R) Repite el proceso de recuperación en varias sesiones espaciadas. La repetición intercalada (spaced repetition) consolida la memoria a largo plazo. Idealmente, programa repasos rápidos los días siguientes.

5. R – Revisión final (a veces incluida como 2.ª o 3.ª R según la versión) Revisa el contenido completo de manera más sintética. Puedes apoyarte en mapas conceptuales, resúmenes o tarjetas. El objetivo es asegurar que la información está organizada y conectada.


En conjunto, LPR 2R es un método que combina lectura comprensiva, formulación de preguntas, recuperación activa y repaso espaciado. Es una estrategia eficiente porque transforma el estudio pasivo en un proceso deliberado y estructurado que mejora la comprensión y la memoria.

[–] PumpkinDrama@reddthat.com 16 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

SherpaTTS — Text-to-Speech using Piper and Coqui models.

[–] PumpkinDrama@reddthat.com 11 points 3 weeks ago (1 children)

RadarWeather — Watch the weather without location tracking.

[–] PumpkinDrama@reddthat.com 28 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

AnkiDroid — Android client for the popular Anki spaced repetition system.

 

Share your favorite open-source F-Droid apps so more users can find and enjoy them.

How to contribute:

  • Single app per comment: mention a single app per comment so popular ones are simple to find.
  • No duplicates: check existing comments first.
  • Upvote what you like: if you like an app someone shared, upvote it to help others discover it.

Let’s build a useful collection of must-have F-Droid apps!

view more: next ›