Browse Source

css fix, image and db removed from repo and hosted elsewhere

main
clemtre 7 months ago
parent
commit
cbd811d2c6
  1. 82
      LISEZMOI.md
  2. 15
      README.md
  3. 1
      TODO.md
  4. 2
      script.js
  5. 5
      signet.sh
  6. 35
      style.css

82
LISEZMOI.md

@ -1,5 +1,4 @@
index.html
![un gestionnaire de lien navigable](demo.png)
LISEZMOI est peut être en retard sur README
**Travail en cours, si vous rencontrez un soucis ennvoyez un mail à
contact@martinlemaire.fr ou ouvrez une issue ici**
@ -8,21 +7,36 @@ Un gestionnaire de marque-page navigable généré à partir d'une base de
donnée textuel que l'on peut utiliser en temps que page d'accueil de
navigateur
Pour essayer avec une base de données BOOKMARKS fourni en exemple :
```
curl -O https://martinlemaire.fr/signet.sh/BOOKMARKS
```
ensuite
```
chmod +x signet.sh
./signet.sh
```
Le script produit le document html suivant :
index.html
![un gestionnaire de lien navigable](https://www.martinlemaire.fr/signet.sh/demo.png)
Un extrait de la base de donnée correspondante, composée d'entrées
séparées par des sauts de lignes avec des champs clé/valeur :
BOOKMARKS
```
...
URL: http://fileformats.archiveteam.org/wiki/HEX_(Unifont)
Name: HEX (Unifont) - Just Solve the File Format Problem
Description:
Tags: bbb, hex
Date: 1704636690
Color: Pink
URL: http://robhagemans.github.io/monobit/
Name: Hoard of bitfonts
Description:
Description: A python tool to manipulate bitmap fonts and do format conversions
Tags: bitmap, fonts
Date: 1704639859
@ -32,19 +46,14 @@ Description:
Tags: gui, wish, tcl
Date: 1704646543
URL: https://en.wikipedia.org/wiki/Tk_(software)
Name: Tk (software) - Wikipedia
Description:
Tags: gui, bsd
Date: 1704646583
URL: https://www.kreativekorp.com/
Name: Rebecca G. Bettencourt
Description:
Tags: RGB, people,hide
Date: 1704648764
...
```
Avec cette base de données, signet colore le premier lien en rose et
cache le dernier car il contient le tag "hide"
# Présentation
## signet.sh
@ -57,6 +66,12 @@ firefox insatisfaisant, autant dans sa forme que dans le format utilisé
(sqlite). Ce script et les utilitaires autours proposent une
alternative pour archiver ses navigations internet.
Lecture en lien :
* FR
*
* EN
* https://www.inkandswitch.com/local-first/
## Format de la base de donné
Seule une Url est requise, le reste des champs sont
facultatifs, on compte les champs suivants :
@ -67,10 +82,26 @@ facultatifs, on compte les champs suivants :
* Date : heure posix de l'ajout du lien
* Color : couleur css (nom, hex, rgb etc...)
# Autres gestionnaires de marque-pages :
- nb https://xwmx.github.io/nb/ (AGPL-3.0)
- ??
# Usage
## Ajouter un marque-page :
Pour ajouter un lien, je séléctionne l'url de la page avec Ctrl + l, la
copie et lance add.sh avec Super + i.
_Si quelqu'un sait récupérer l'url de la page courante du navigateur
sans avoir à la copier, ça économiserait deux étapes sur trois._
En résumé : Ctrl + l, Ctrl + c, Super + i
(ou plus court : Ctrl + l + c, Super + i)
Super + i car dans le fichier de configuration de mon gestionnaire de
fenêtre situé dans ~/.config/awesome/rc.lua j'ai les lignes suivantes :
```
awful.key({modkey}, "i", function()
awful.util.spawn_with_shell("add.sh") end,
{description = "Enregistre le lien copié dans signet.sh"}),
```
# Dependance~~s~~ :
Pour ajouter un lien via l'interface proposée, on aura besoin
@ -124,25 +155,6 @@ Pour l'instant cette étape est bloquante. Pour peu que la connection
internet coupe lors de l'ajout d'un lien, il faudra attendre la fin de
la tentative de curl pour passer au prochain champs du script :/ sorry !
# Usage :
Pour ajouter un lien, je séléctionne l'url de la page avec Ctrl + l, la
copie et lance add.sh avec Super + i.
_Si quelqu'un sait récupérer l'url de la page courante du navigateur
sans avoir à la copier, ça économiserait deux étapes._
En résumé : Ctrl + l, Ctrl + c, Super + i
(ou plus court : Ctrl + l + c, Super + i)
Super + i car dans le fichier de configuration de mon gestionnaire de
fenêtre situé dans ~/.config/awesome/rc.lua j'ai les lignes suivantes :
```
awful.key({modkey}, "i", function()
awful.util.spawn_with_shell("add.sh") end,
{description = "Enregistre le lien copié dans signet.sh"}),
```
# Structure du répertoire
* BOOKMARKS → Une base de données de liens
@ -173,6 +185,10 @@ starred.sh → Un curl des repos de l'api github
https://api.github.com/users/[user]/starred , formaté de json à une
liste html sans jq !
# Autres gestionnaires de marque-pages :
- nb https://xwmx.github.io/nb/ (AGPL-3.0)
- ??
# Crédits
* Junicode (OFL-1.1)
https://psb1558.github.io/Junicode-font/

15
README.md

@ -11,8 +11,13 @@ called BOOKMARKS or by running the provided script called
edit_bookmarks_dmenu.sh (requires dmenu). The script can be ran from the
command line but I suggest to bind it to a keystroke combination.
With the provided BOOKMARKS database :
If you want to try with an example BOOKMARKS database :
```
curl -O https://martinlemaire.fr/signet.sh/BOOKMARKS
```
then
```
git clone https://git.vvvvvvaria.org/clemtre/signet.sh.git
chmod +x signet.sh
./signet.sh
```
@ -20,9 +25,9 @@ chmod +x signet.sh
It produces the following html document :
index.html
![a browsable bookmark manager](demo.png)
A sample of its corresponding textual database, in the form of blankline separated
records with key/value fields :
![a browsable bookmark manager](https://www.martinlemaire.fr/signet.sh/demo.png)
A sample of its corresponding textual database, in the form of blankline
separated records with key/value fields :
BOOKMARKS
```
@ -35,7 +40,7 @@ Color: Pink
URL: http://robhagemans.github.io/monobit/
Name: Hoard of bitfonts
Description: A python tool to manipulate bitmap fonts and do format conversions
Description: Bitmap fonts collection
Tags: bitmap, fonts
Date: 1704639859

1
TODO.md

@ -2,6 +2,7 @@ unsorted list of things that would be nice to have
* *make a make*file in order to variabilize language in add.sh prompts
and make overall config easier
* write more structured css
* pin links
→ add an optional boolean to the records implictly false if absent.
if true, the link sits on top of the pile

2
script.js

@ -39,7 +39,7 @@ function formatDateFromEpoch(epochTime) {
return `N/A`;
}
return `${YY}-${MM}-${DD}`;
return `${YY}/${MM}/${DD}`;
}
const dates = document.querySelectorAll('h4')

5
signet.sh

@ -18,7 +18,7 @@ cat <<- EOF > $DEST
</head>
<body>
<div id="cc"></div>
<textarea autofocus id=""></textarea>
<textarea autofocus></textarea>
<nav>
$(
awk '/Tags: ./ {print tolower($0)}' $DB |\
@ -29,7 +29,7 @@ awk '/Tags: ./ {print tolower($0)}' $DB |\
</nav>
<ol>
$(
awk -v RS= '!/Tags: .*hide/ {print $0 "\n"}' $DB | \
awk -v RS= '!/Tags: .*hide/ {print $0 "\n"}' $DB |\
awk -v RS= '
{
if ($0 != "") {
@ -73,6 +73,7 @@ awk -v RS= '
} '
)
</ol>
<footer></footer>
</body>
</html>
EOF

35
style.css

@ -9,21 +9,30 @@
--font-size-s:calc(var(--font-size) / 1.5);
--line-height:24px;
--gutter:0px;
--padding:2px;
--height:auto;
--color:black;
--selection:purple;
--background:#FFF;
--background-2:#FEFEFE;
--background-bottom:black;
}
/* https://github.com/psb1558/Junicode-font/releases */
@font-face {
font-family: Junicode;
/* https://github.com/psb1558/Junicode-font/releases */
src: url("Junicode-CondLight.otf") format("opentype");
}
@font-face {
font-family: Junicode;
src: url("Junicode-CondLightItalic.otf") format("opentype");
font-style:italic;
}
* {
font-family: Junicode;
font-variant-numeric: lining-nums;
}
h1,h2,h3,h4,h5,p, a {
word-break: break-all;
width:fit-content;
line-height:var(--line-height);
padding:0;
@ -31,6 +40,9 @@ h1,h2,h3,h4,h5,p, a {
font-weight:normal;
font-size:var(--font-size);
}
nav, section, textarea {
padding: var(--padding) 0;
}
a{
width:100%;
display:block;
@ -53,16 +65,27 @@ textarea{
z-index:10;
width:calc(100vw - 10px);
font-size:var(--font-size);
height:var(--line-height);
height:calc(var(--line-height) + var(--padding));
}
ol {
margin:0;
display:flex;
gap:var(--gutter);
flex-direction:column-reverse;
margin-bottom:50vh;
padding-left: 34px;
}
body {
}
footer {
height:100vh;
margin-top:50vh;
background:linear-gradient( var(--background), var(--background-bottom));
width:calc(100% + 20px - 2px);
margin-left:-10px;
margin-bottom:-10px;
overflow:hidden;
}
li {
font-size:var(--font-size);
@ -107,7 +130,7 @@ h5,h2,h3,h4 {
}
h3::before, h2::before, h1::after{content:'\00a0·\00a0'}
h4 {
margin-left:auto
margin-left:auto;
}
html{background:white}
nav p {display:inline;
@ -124,8 +147,8 @@ nav p::after{
nav {
border-top: 1px solid black;
border-bottom: 1px solid black;
margin-top:calc(var(--line-height) + 1px);
height:var(--line-height);
margin-top:calc(var(--line-height) + 1px + var(--padding));
height:calc(var(--line-height) + var(--padding) * 2);
overflow:hidden;
}

Loading…
Cancel
Save