mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-06-09 09:16:34 +00:00
Compare commits
24 Commits
ref-go-upd
...
v1.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35992b4aa4 | ||
|
|
ca46158d68 | ||
|
|
c78662056d | ||
|
|
4ac9e69f92 | ||
|
|
7d49bf1981 | ||
|
|
e276bb32a5 | ||
|
|
476548cd06 | ||
|
|
eff21a266c | ||
|
|
a2e4368da8 | ||
|
|
22e35e612e | ||
|
|
55a5280057 | ||
|
|
f5843b8519 | ||
|
|
9cd869e3bb | ||
|
|
b882a30659 | ||
|
|
489c27ea01 | ||
|
|
456bb61896 | ||
|
|
9fe80496d3 | ||
|
|
fdc6968322 | ||
|
|
dcc542d70b | ||
|
|
6b7a78a18a | ||
|
|
b476074f04 | ||
|
|
cf1c486616 | ||
|
|
1d87306129 | ||
|
|
5a92412348 |
31
.github/workflows/node.js.yml
vendored
Normal file
31
.github/workflows/node.js.yml
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
name: Node.js CI
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
pull_request:
|
||||
jobs:
|
||||
build:
|
||||
name: "Fmt, Lint, & Test"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version:
|
||||
- 20.x
|
||||
- latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: "Webi: Install 'shfmt' and 'shellcheck', and update PATH"
|
||||
run: |
|
||||
sh ./_scripts/install-ci-deps
|
||||
echo "${HOME}/.local/bin" >> $GITHUB_PATH
|
||||
- run: shfmt --version
|
||||
- run: shellcheck -V
|
||||
- run: node --version
|
||||
- run: npm run fmt
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run test
|
||||
1
.jshintignore
Normal file
1
.jshintignore
Normal file
@@ -0,0 +1 @@
|
||||
DELETEMEnode_modules/**/*
|
||||
4
.prettierignore
Normal file
4
.prettierignore
Normal file
@@ -0,0 +1,4 @@
|
||||
node_modules
|
||||
jsconfig.json
|
||||
package.json
|
||||
package-lock.json
|
||||
@@ -1,6 +1,9 @@
|
||||
{
|
||||
"trailingComma": "all",
|
||||
"tabWidth": 2,
|
||||
"bracketSpacing": true,
|
||||
"printWidth": 80,
|
||||
"proseWrap": "always",
|
||||
"singleQuote": true,
|
||||
"proseWrap": "always"
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "all",
|
||||
"semi": true
|
||||
}
|
||||
|
||||
1
AtomicParsley
Symbolic link
1
AtomicParsley
Symbolic link
@@ -0,0 +1 @@
|
||||
atomicparsley
|
||||
@@ -15,11 +15,11 @@ function getAllReleases(request, owner, repo, baseurl) {
|
||||
if (!baseurl) {
|
||||
return Promise.reject('missing baseurl');
|
||||
}
|
||||
return ghRelease(request, owner, repo, baseurl + '/api/v1').then(function (
|
||||
all,
|
||||
) {
|
||||
return all;
|
||||
});
|
||||
return ghRelease(request, owner, repo, baseurl + '/api/v1').then(
|
||||
function (all) {
|
||||
return all;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
module.exports = getAllReleases;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
var pkg = require('../package.json');
|
||||
var spawn = require('child_process').spawn;
|
||||
var os = require('os');
|
||||
var path = require('path');
|
||||
|
||||
function spawner(args) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
9
_scripts/install-ci-deps
Executable file
9
_scripts/install-ci-deps
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -u
|
||||
|
||||
# Install 'shfmt 3.7.x'
|
||||
curl -fsS https://webi.sh/shfmt@3.7 | sh
|
||||
|
||||
# Install 'shellcheck v0.9.x'
|
||||
curl -fsS https://webi.sh/shellcheck@0.9 | sh
|
||||
@@ -73,6 +73,7 @@ function normalize(all) {
|
||||
};
|
||||
|
||||
all.releases.forEach(function (rel) {
|
||||
/* jshint maxcomplexity:25 */
|
||||
rel.version = rel.version.replace(/^v/i, '');
|
||||
if (!rel.name) {
|
||||
rel.name = rel.download.replace(/.*\//, '');
|
||||
@@ -95,13 +96,14 @@ function normalize(all) {
|
||||
supported.oses[rel.os] = true;
|
||||
|
||||
if (!rel.arch) {
|
||||
arches.some(function (regKey) {
|
||||
var arch = (rel.name || rel.download).match(archMap[regKey]) && regKey;
|
||||
if (arch) {
|
||||
for (let arch of arches) {
|
||||
let name = rel.name || rel.download;
|
||||
let isArch = name.match(archMap[arch]);
|
||||
if (isArch) {
|
||||
rel.arch = arch;
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (!rel.arch) {
|
||||
if ('macos' === rel.os) {
|
||||
|
||||
@@ -75,6 +75,8 @@ function getArch(ua) {
|
||||
return 'armv7l';
|
||||
} else if (/arm6|armv6/i.test(ua)) {
|
||||
return 'armv6l';
|
||||
} else if (/ppc64le/i.test(ua)) {
|
||||
return 'ppc64le';
|
||||
} else if (/ppc64/i.test(ua)) {
|
||||
return 'ppc64';
|
||||
} else if (/mips64/i.test(ua)) {
|
||||
|
||||
@@ -11,6 +11,7 @@ module.exports = function (request) {
|
||||
'armv6l',
|
||||
'armv7l',
|
||||
'ppc64le',
|
||||
'ppc64',
|
||||
's390x',
|
||||
'x86',
|
||||
];
|
||||
|
||||
538
atomicparsley/README.md
Normal file
538
atomicparsley/README.md
Normal file
@@ -0,0 +1,538 @@
|
||||
---
|
||||
title: atomicparsley
|
||||
homepage: https://github.com/wez/atomicparsley
|
||||
tagline: |
|
||||
AtomicParsley is a lightweight tool for reading, parsing and setting iTunes-style metadata.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi atomicparsley@stable` (or `@v20221229`,
|
||||
`@beta`, etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```text
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/bin/AtomicParsley
|
||||
```
|
||||
|
||||
**Windows Users**
|
||||
|
||||
```text
|
||||
\Windows\System32\vcruntime140.dll
|
||||
```
|
||||
|
||||
This will also attempt to install the
|
||||
[Microsoft Visual C++ Redistributable](/vcruntime) via `webi vcruntime`. If it
|
||||
fails and you get the error _`vcruntime140.dll` was not found_, you'll need to
|
||||
[install it manually](https://learn.microsoft.com/en-US/cpp/windows/latest-supported-vc-redist?view=msvc-170).
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> `AtomicParsley` is an alternative to `ffmpeg` and `ffprobe` for viewing and
|
||||
> changing metadata in MPEG-4 files with .3gp, .3g2, .mp4, .m4a, .m4b, .m4p,
|
||||
> .m4r, and .m4v extensions. Because it's purpose-built for MP4 containers, it
|
||||
> can do some things `ffmpeg` can't - like adding album artwork.
|
||||
|
||||
### How to Change Album Art
|
||||
|
||||
1. Save any existing cover art
|
||||
```sh
|
||||
AtomicParsley ./my-song.m4a --extractPixToPath ./ 'my-song'
|
||||
```
|
||||
2. Remove the artwork
|
||||
```sh
|
||||
AtomicParsley ./my-song.m4a --artwork REMOVE_ALL
|
||||
```
|
||||
3. Add new artwork at the specified DPI (and other constraints)
|
||||
|
||||
```sh
|
||||
export PIC_OPTIONS="DPI=72"
|
||||
|
||||
AtomicParsley ./my-podcast-audiobook.m4b --artwork ./my-season-1-cover.jpg
|
||||
```
|
||||
|
||||
Only JPEG and PNG are supported. See `PIC_OPTIONS` down below for more options.
|
||||
If you get an error, try exporting your file with a DPI to 72 (or up to 300 with
|
||||
`PIC_OPTIONS` set) and a smaller resolution - perhaps 600x600 or 1500x1500 (what
|
||||
old versions iTunes versions used).
|
||||
|
||||
### How to Remove Apple Account Info
|
||||
|
||||
```sh
|
||||
AtomicParsley ./my-file.m4a \
|
||||
--DeepScan \
|
||||
--manualAtomRemove "moov.trak.mdia.minf.stbl.mp4a.pinf" \
|
||||
--manualAtomRemove "moov.udta.meta.ilst.apID" \
|
||||
--manualAtomRemove "moov.udta.meta.ilst.cnID" \
|
||||
--manualAtomRemove "moov.udta.meta.ilst.purd" \
|
||||
--manualAtomRemove "moov.udta.meta.ilst.sfID" \
|
||||
--manualAtomRemove "moov.udta.meta.ilst.soal" \
|
||||
--manualAtomRemove "moov.udta.meta.ilst.xid"
|
||||
```
|
||||
|
||||
If you wanted to also remove information that indicates which Country or
|
||||
Language the song was purchased in, or which album it was purchased from, there
|
||||
are some additional IDs to consider:
|
||||
|
||||
| Metadata Tag | Description |
|
||||
| ---------------------------------------- | -------------------------------------------- |
|
||||
| moov.udta.meta.ilst.apID | Apple account email address |
|
||||
| moov.udta.meta.ilst.ownr | Apple account username |
|
||||
| moov.udta.meta.ilst.atID | Artist-track ID |
|
||||
| moov.udta.meta.ilst.cnID | iTunes Catalog ID |
|
||||
| moov.udta.meta.ilst.geID | Genre ID |
|
||||
| moov.udta.meta.ilst.plID | Playlist ID (identifies album) |
|
||||
| moov.udta.meta.ilst.sfID | iTunes store identifier (location/number) |
|
||||
| moov.udta.meta.ilst.cprt | Copyright information |
|
||||
| moov.udta.meta.ilst.flvr | Bitrate/video size related |
|
||||
| moov.udta.meta.ilst.purd | Date purchased |
|
||||
| moov.udta.meta.ilst.rtng | Explicit/Clean information |
|
||||
| moov.udta.meta.ilst.soal | Album sort name |
|
||||
| moov.udta.meta.ilst.stik | Media type information |
|
||||
| moov.udta.meta.ilst.xid | Vendor xID |
|
||||
| moov.udta.meta.ilst.----.name:[iTunMOVI] | Embedded plist contains filesize and flavor. |
|
||||
| moov.trak.mdia.minf.stbl.stsd.mp4a.pinf | Purchase information related |
|
||||
|
||||
See <https://gist.github.com/riophae/f5694fd2952cb64982689b971ca6ec79>.
|
||||
|
||||
### Genre Lists
|
||||
|
||||
All values are **case sensitive**.
|
||||
|
||||
#### The "stik" List
|
||||
|
||||
These values are **case sensitive**:
|
||||
|
||||
0. `Home Video`
|
||||
1. `Normal` (meaning music)
|
||||
2. `Audiobook` (changes extension to .m4b)
|
||||
3. `Whacked Bookmark`
|
||||
4. `Music Video`
|
||||
5. `Movie`
|
||||
6. `Short Film`
|
||||
7. `TV Show`
|
||||
8. `Booklet`
|
||||
|
||||
#### Standard Music Genres
|
||||
|
||||
```txt
|
||||
(1.) Blues
|
||||
(2.) Classic Rock
|
||||
(3.) Country
|
||||
(4.) Dance
|
||||
(5.) Disco
|
||||
(6.) Funk
|
||||
(7.) Grunge
|
||||
(8.) Hip-Hop
|
||||
(9.) Jazz
|
||||
(10.) Metal
|
||||
(11.) New Age
|
||||
(12.) Oldies
|
||||
(13.) Other
|
||||
(14.) Pop
|
||||
(15.) R&B
|
||||
(16.) Rap
|
||||
(17.) Reggae
|
||||
(18.) Rock
|
||||
(19.) Techno
|
||||
(20.) Industrial
|
||||
(21.) Alternative
|
||||
(22.) Ska
|
||||
(23.) Death Metal
|
||||
(24.) Pranks
|
||||
(25.) Soundtrack
|
||||
(26.) Euro-Techno
|
||||
(27.) Ambient
|
||||
(28.) Trip-Hop
|
||||
(29.) Vocal
|
||||
(30.) Jazz+Funk
|
||||
(31.) Fusion
|
||||
(32.) Trance
|
||||
(33.) Classical
|
||||
(34.) Instrumental
|
||||
(35.) Acid
|
||||
(36.) House
|
||||
(37.) Game
|
||||
(38.) Sound Clip
|
||||
(39.) Gospel
|
||||
(40.) Noise
|
||||
(41.) AlternRock
|
||||
(42.) Bass
|
||||
(43.) Soul
|
||||
(44.) Punk
|
||||
(45.) Space
|
||||
(46.) Meditative
|
||||
(47.) Instrumental Pop
|
||||
(48.) Instrumental Rock
|
||||
(49.) Ethnic
|
||||
(50.) Gothic
|
||||
(51.) Darkwave
|
||||
(52.) Techno-Industrial
|
||||
(53.) Electronic
|
||||
(54.) Pop-Folk
|
||||
(55.) Eurodance
|
||||
(56.) Dream
|
||||
(57.) Southern Rock
|
||||
(58.) Comedy
|
||||
(59.) Cult
|
||||
(60.) Gangsta
|
||||
(61.) Top 40
|
||||
(62.) Christian Rap
|
||||
(63.) Pop/Funk
|
||||
(64.) Jungle
|
||||
(65.) Native American
|
||||
(66.) Cabaret
|
||||
(67.) New Wave
|
||||
(68.) Psychadelic
|
||||
(69.) Rave
|
||||
(70.) Showtunes
|
||||
(71.) Trailer
|
||||
(72.) Lo-Fi
|
||||
(73.) Tribal
|
||||
(74.) Acid Punk
|
||||
(75.) Acid Jazz
|
||||
(76.) Polka
|
||||
(77.) Retro
|
||||
(78.) Musical
|
||||
(79.) Rock & Roll
|
||||
(80.) Hard Rock
|
||||
(81.) Folk
|
||||
(82.) Folk/Rock
|
||||
(83.) National Folk
|
||||
(84.) Swing
|
||||
(85.) Fast Fusion
|
||||
(86.) Bebob
|
||||
(87.) Latin
|
||||
(88.) Revival
|
||||
(89.) Celtic
|
||||
(90.) Bluegrass
|
||||
(91.) Avantgarde
|
||||
(92.) Gothic Rock
|
||||
(93.) Progressive Rock
|
||||
(94.) Psychedelic Rock
|
||||
(95.) Symphonic Rock
|
||||
(96.) Slow Rock
|
||||
(97.) Big Band
|
||||
(98.) Chorus
|
||||
(99.) Easy Listening
|
||||
(100.) Acoustic
|
||||
(101.) Humour
|
||||
(102.) Speech
|
||||
(103.) Chanson
|
||||
(104.) Opera
|
||||
(105.) Chamber Music
|
||||
(106.) Sonata
|
||||
(107.) Symphony
|
||||
(108.) Booty Bass
|
||||
(109.) Primus
|
||||
(110.) Porn Groove
|
||||
(111.) Satire
|
||||
(112.) Slow Jam
|
||||
(113.) Club
|
||||
(114.) Tango
|
||||
(115.) Samba
|
||||
(116.) Folklore
|
||||
(117.) Ballad
|
||||
(118.) Power Ballad
|
||||
(119.) Rhythmic Soul
|
||||
(120.) Freestyle
|
||||
(121.) Duet
|
||||
(122.) Punk Rock
|
||||
(123.) Drum Solo
|
||||
(124.) A Capella
|
||||
(125.) Euro-House
|
||||
(126.) Dance Hall
|
||||
```
|
||||
|
||||
#### iTunes Movie Genre IDs
|
||||
|
||||
```sh
|
||||
AtomicParsley --genre-movie-id-list
|
||||
```
|
||||
|
||||
```text
|
||||
(4401) Action & Adventure
|
||||
(4402) Anime
|
||||
(4403) Classics
|
||||
(4404) Comedy
|
||||
(4405) Documentary
|
||||
(4406) Drama
|
||||
(4407) Foreign
|
||||
(4408) Horror
|
||||
(4409) Independent
|
||||
(4410) Kids & Family
|
||||
(4411) Musicals
|
||||
(4412) Romance
|
||||
(4413) Sci-Fi & Fantasy
|
||||
(4414) Short Films
|
||||
(4415) Special Interest
|
||||
(4416) Thriller
|
||||
(4417) Sports
|
||||
(4418) Western
|
||||
(4419) Urban
|
||||
(4420) Holiday
|
||||
(4421) Made for TV
|
||||
(4422) Concert Films
|
||||
(4423) Music Documentaries
|
||||
(4424) Music Feature Films
|
||||
(4425) Japanese Cinema
|
||||
(4426) Jidaigeki
|
||||
(4427) Tokusatsu
|
||||
(4428) Korean Cinema
|
||||
```
|
||||
|
||||
#### iTunes TV Genre IDs
|
||||
|
||||
```sh
|
||||
AtomicParsley --genre-tv-id-list
|
||||
```
|
||||
|
||||
```text
|
||||
(4000) Comedy
|
||||
(4001) Drama
|
||||
(4002) Animation
|
||||
(4003) Action & Adventure
|
||||
(4004) Classic
|
||||
(4005) Kids
|
||||
(4005) Nonfiction
|
||||
(4007) Reality TV
|
||||
(4008) Sci-Fi & Fantasy
|
||||
(4009) Sports
|
||||
(4010) Teens
|
||||
(4011) Latino TV
|
||||
```
|
||||
|
||||
### Help
|
||||
|
||||
Note: Normally we don't include full help text, but since AtomicParsley has a
|
||||
long history across various maintainers and repos, we feel it's appropriate to
|
||||
do so in this case.
|
||||
|
||||
```text
|
||||
AtomicParsley sets metadata into MPEG-4 files & derivatives supporting 3 tag
|
||||
schemes: iTunes-style, 3GPP assets & ISO defined copyright notifications.
|
||||
|
||||
AtomicParsley quick help for setting iTunes-style metadata into MPEG-4 files.
|
||||
|
||||
General usage examples:
|
||||
AtomicParsley /path/to.mp4 -T 1
|
||||
AtomicParsley /path/to.mp4 -t +
|
||||
AtomicParsley /path/to.mp4 --artist "Me" --artwork /path/to/art.jpg
|
||||
Atomicparsley /path/to.mp4 --albumArtist "You" --podcastFlag true
|
||||
Atomicparsley /path/to.mp4 --stik "TV Show" --advisory explicit
|
||||
|
||||
Getting information about the file & tags:
|
||||
-T --test Test file for mpeg4-ishness & print atom tree
|
||||
-t --textdata Prints tags embedded within the file
|
||||
-E --extractPix Extracts pix to the same folder as the mpeg-4 file
|
||||
|
||||
Setting iTunes-style metadata tags
|
||||
--artist (string) Set the artist tag
|
||||
--title (string) Set the title tag
|
||||
--album (string) Set the album tag
|
||||
--genre (string) Genre tag (see --longhelp for more info)
|
||||
--tracknum (num)[/tot] Track number (or track number/total tracks)
|
||||
--disk (num)[/tot] Disk number (or disk number/total disks)
|
||||
--comment (string) Set the comment tag
|
||||
--year (num|UTC) Year tag (see --longhelp for "Release Date")
|
||||
--lyrics (string) Set lyrics (not subject to 256 byte limit)
|
||||
--lyricsFile (/path) Set lyrics to the content of a file
|
||||
--composer (string) Set the composer tag
|
||||
--copyright (string) Set the copyright tag
|
||||
--grouping (string) Set the grouping tag
|
||||
--artwork (/path) Set a piece of artwork (jpeg or png only)
|
||||
--bpm (number) Set the tempo/bpm
|
||||
--albumArtist (string) Set the album artist tag
|
||||
--compilation (boolean) Set the compilation flag (true or false)
|
||||
--hdvideo (number) Set the hdvideo flag to one of:
|
||||
false or 0 for standard definition
|
||||
true or 1 for 720p
|
||||
2 for 1080p
|
||||
--advisory (string*) Content advisory (*values: 'clean', 'explicit')
|
||||
--stik (string*) Sets the iTunes "stik" atom (see --longhelp)
|
||||
--description (string) Set the description tag
|
||||
--longdesc (string) Set the long description tag
|
||||
--storedesc (string) Set the store description tag
|
||||
--TVNetwork (string) Set the TV Network name
|
||||
--TVShowName (string) Set the TV Show name
|
||||
--TVEpisode (string) Set the TV episode/production code
|
||||
--TVSeasonNum (number) Set the TV Season number
|
||||
--TVEpisodeNum (number) Set the TV Episode number
|
||||
--podcastFlag (boolean) Set the podcast flag (true or false)
|
||||
--category (string) Sets the podcast category
|
||||
--keyword (string) Sets the podcast keyword
|
||||
--podcastURL (URL) Set the podcast feed URL
|
||||
--podcastGUID (URL) Set the episode's URL tag
|
||||
--purchaseDate (UTC) Set time of purchase
|
||||
--encodingTool (string) Set the name of the encoder
|
||||
--encodedBy (string) Set the name of the Person/company who encoded the file
|
||||
--apID (string) Set the Account Name
|
||||
--cnID (number) Set the iTunes Catalog ID (see --longhelp)
|
||||
--geID (number) Set the iTunes Genre ID (see --longhelp)
|
||||
--xID (string) Set the vendor-supplied iTunes xID (see --longhelp)
|
||||
--gapless (boolean) Set the gapless playback flag
|
||||
--contentRating (string*) Set tv/mpaa rating (see -rDNS-help)
|
||||
|
||||
Deleting tags
|
||||
Set the value to "": --artist "" --stik "" --bpm ""
|
||||
To delete (all) artwork: --artwork REMOVE_ALL
|
||||
manually removal: --manualAtomRemove "moov.udta.meta.ilst.ATOM"
|
||||
|
||||
More detailed iTunes help is available with AtomicParsley --longhelp
|
||||
Setting reverse DNS forms for iTunes files: see --reverseDNS-help
|
||||
Setting 3gp assets into 3GPP & derivative files: see --3gp-help
|
||||
Setting copyright notices for all files: see --ISO-help
|
||||
For file-level options & padding info: see --file-help
|
||||
Setting custom private tag extensions: see --uuid-help
|
||||
Setting ID3 tags onto mpeg-4 files: see --ID3-help
|
||||
|
||||
----------------------------------------------------------------------
|
||||
AtomicParsley version: 20221229.172126.0 d813aa6e0304ed3ab6d92f1ae96cd52b586181ec (utf8)
|
||||
|
||||
Submit bug fixes to https://github.com/wez/atomicparsley
|
||||
```
|
||||
|
||||
### `--longhelp`
|
||||
|
||||
```text
|
||||
AtomicParsley help page for setting iTunes-style metadata into MPEG-4 files.
|
||||
(3gp help available with AtomicParsley --3gp-help)
|
||||
(ISO copyright help available with AtomicParsley --ISO-help)
|
||||
(reverse DNS form help available with AtomicParsley --reverseDNS-help)
|
||||
Usage: AtomicParsley [mp4FILE]... [OPTION]... [ARGUMENT]... [ [OPTION2]...[ARGUMENT2]...]
|
||||
|
||||
example: AtomicParsley /path/to.mp4 -e ~/Desktop/pix
|
||||
example: AtomicParsley /path/to.mp4 --podcastURL "http://www.url.net" --tracknum 45/356
|
||||
example: AtomicParsley /path/to.mp4 --copyright "℗ © 2006"
|
||||
example: AtomicParsley /path/to.mp4 --year "2006-07-27T14:00:43Z" --purchaseDate timestamp
|
||||
example: AtomicParsley /path/to.mp4 --sortOrder artist "Mighty Dub Cats, The
|
||||
------------------------------------------------------------------------------------------------
|
||||
Extract any pictures in user data "covr" atoms to separate files.
|
||||
--extractPix , -E Extract to same folder (basename derived from file).
|
||||
--extractPixToPath , -e (/path/basename) Extract to specific path (numbers added to basename).
|
||||
example: --e ~/Desktop/SomeText
|
||||
gives: SomeText_artwork_1.jpg SomeText_artwork_2.png
|
||||
Note: extension comes from embedded image file format
|
||||
------------------------------------------------------------------------------------------------
|
||||
Tag setting options:
|
||||
|
||||
--artist , -a (str) Set the artist tag: "moov.udta.meta.ilst.©ART.data"
|
||||
--title , -s (str) Set the title tag: "moov.udta.meta.ilst.©nam.data"
|
||||
--album , -b (str) Set the album tag: "moov.udta.meta.ilst.©alb.data"
|
||||
--genre , -g (str) Set the genre tag: "©gen" (custom) or "gnre" (standard).
|
||||
see the standard list with "AtomicParsley --genre-list"
|
||||
--tracknum , -k (num)[/tot] Set the track number (or track number & total tracks).
|
||||
--disk , -d (num)[/tot] Set the disk number (or disk number & total disks).
|
||||
--comment , -c (str) Set the comment tag: "moov.udta.meta.ilst.©cmt.data"
|
||||
--year , -y (num|UTC) Set the year tag: "moov.udta.meta.ilst.©day.data"
|
||||
set with UTC "2006-09-11T09:00:00Z" for Release Date
|
||||
--lyrics , -l (str) Set the lyrics tag: "moov.udta.meta.ilst.©lyr.data"
|
||||
--lyricsFile , (/path) Set the lyrics tag to the content of a file
|
||||
--composer , -w (str) Set the composer tag: "moov.udta.meta.ilst.©wrt.data"
|
||||
--copyright , -x (str) Set the copyright tag: "moov.udta.meta.ilst.cprt.data"
|
||||
--grouping , -G (str) Set the grouping tag: "moov.udta.meta.ilst.©grp.data"
|
||||
--artwork , -A (/path) Set a piece of artwork (jpeg or png) on "covr.data"
|
||||
Note: multiple pieces are allowed with more --artwork args
|
||||
--bpm , -B (num) Set the tempo/bpm tag: "moov.udta.meta.ilst.tmpo.data"
|
||||
--albumArtist , -A (str) Set the album artist tag: "moov.udta.meta.ilst.aART.data"
|
||||
--compilation , -C (bool) Sets the "cpil" atom (true or false to delete the atom)
|
||||
--hdvideo , -V (bool) Sets the "hdvd" atom (true or false to delete the atom)
|
||||
--advisory , -y (1of3) Sets the iTunes lyrics advisory ('remove', 'clean', 'explicit')
|
||||
--stik , -S (1of7) Sets the iTunes "stik" atom (--stik "remove" to delete)
|
||||
"Movie", "Normal", "TV Show" .... others:
|
||||
see the full list with "AtomicParsley --stik-list"
|
||||
or set in an integer value with --stik value=(num)
|
||||
Note: --stik Audiobook will change file extension to '.m4b'
|
||||
--description , -p (str) Sets the description on the "desc" atom
|
||||
--Rating , (str) Sets the Rating on the "rate" atom
|
||||
--longdesc , -j (str) Sets the long description on the "ldes" atom
|
||||
--storedesc , (str) Sets the iTunes store description on the "sdes" atom
|
||||
--TVNetwork , -n (str) Sets the TV Network name on the "tvnn" atom
|
||||
--TVShowName , -H (str) Sets the TV Show name on the "tvsh" atom
|
||||
--TVEpisode , -I (str) Sets the TV Episode on "tven":"209", but it is a string: "209 Part 1"
|
||||
--TVSeasonNum , -U (num) Sets the TV Season number on the "tvsn" atom
|
||||
--TVEpisodeNum , -N (num) Sets the TV Episode number on the "tves" atom
|
||||
--podcastFlag , -f (bool) Sets the podcast flag (values are "true" or "false")
|
||||
--category , -q (str) Sets the podcast category; typically a duplicate of its genre
|
||||
--keyword , -K (str) Sets the podcast keyword; invisible to MacOSX Spotlight
|
||||
--podcastURL , -L (URL) Set the podcast feed URL on the "purl" atom
|
||||
--podcastGUID , -J (URL) Set the episode's URL tag on the "egid" atom
|
||||
--purchaseDate , -D (UTC) Set Universal Coordinated Time of purchase on a "purd" atom
|
||||
(use "timestamp" to set UTC to now; can be akin to id3v2 TDTG tag)
|
||||
--encodingTool , (str) Set the name of the encoder on the "©too" atom
|
||||
--encodedBy , (str) Set the name of the Person/company who encoded the file on the "©enc" atom
|
||||
--apID , -Y (str) Set the name of the Account Name on the "apID" atom
|
||||
--cnID , (num) Set iTunes Catalog ID, used for combining SD and HD encodes in iTunes on the "cnID" atom
|
||||
|
||||
To combine you must set "hdvd" atom on one file and must have same "stik" on both file
|
||||
Must not use "stik" of value Home Video(0), use Movie(9)
|
||||
|
||||
iTunes Catalog numbers can be obtained by finding the item in the iTunes Store. Once item
|
||||
is found in the iTunes Store right click on picture of item and select copy link. Paste this link
|
||||
into a document or web browser to display the catalog number ID.
|
||||
|
||||
An example link for the video Street Kings is:
|
||||
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMovie?id=278743714&s=143441
|
||||
Here you can see the cnID is 278743714
|
||||
|
||||
Alternatively you can use iMDB numbers, however these will not match the iTunes catalog.
|
||||
|
||||
--geID , (num) Set iTunes Genre ID. This does not necessarily have to match genre.
|
||||
See --genre-movie-id-list and --genre-tv-id-list
|
||||
|
||||
--xID , (str) Set iTunes vendor-supplied xID, used to allow iTunes LPs and iTunes Extras to interact
|
||||
with other content in your iTunes Library
|
||||
--gapless , (bool) Sets the gapless playback flag for a track in a gapless album
|
||||
--sortOrder (type) (str) Sets the sort order string for that type of tag.
|
||||
(available types are: "name", "artist", "albumartist",
|
||||
"album", "composer", "show")
|
||||
|
||||
NOTE: Except for artwork, only 1 of each tag is allowed; artwork allows multiple pieces.
|
||||
NOTE: Tags that carry text(str) have a limit of 255 utf8 characters;
|
||||
however lyrics and long descriptions have no limit.
|
||||
------------------------------------------------------------------------------------------------
|
||||
To delete a single atom, set the tag to null (except artwork):
|
||||
--artist "" --lyrics ""
|
||||
--artwork REMOVE_ALL
|
||||
--metaEnema , -P Douches away every atom under "moov.udta.meta.ilst"
|
||||
--foobar2000Enema , -2 Eliminates foobar2000's non-compliant so-out-o-spec tagging scheme
|
||||
--manualAtomRemove "some.atom.path" where some.atom.path can be:
|
||||
keys to using manualAtomRemove:
|
||||
ilst.ATOM.data or ilst.ATOM target an iTunes-style metadata tag
|
||||
ATOM:lang=foo target an atom with this language setting; like 3gp assets
|
||||
ATOM.----.name:[foo] target a reverseDNS metadata tag; like iTunNORM
|
||||
Note: these atoms show up with 'AP -t' as: Atom "----" [foo]
|
||||
'foo' is actually carried on the 'name' atom
|
||||
ATOM[x] target an atom with an index other than 1; like trak[2]
|
||||
ATOM.uuid=hex-hex-hex-hex targt a uuid atom with the uuid of hex string representation
|
||||
examples:
|
||||
moov.udta.meta.ilst.----.name:[iTunNORM] moov.trak[3].cprt:lang=urd
|
||||
moov.trak[2].uuid=55534d54-21d2-4fce-bb88-695cfac9c740
|
||||
------------------------------------------------------------------------------------------------
|
||||
Environmental Variables (affecting picture placement)
|
||||
|
||||
set PIC_OPTIONS in your shell to set these flags; preferences are separated by colons (:)
|
||||
|
||||
MaxDimensions=num (default: 0; unlimited); sets maximum pixel dimensions
|
||||
DPI=num (default: 72); sets dpi
|
||||
MaxKBytes=num (default: 0; unlimited); maximum kilobytes for file (jpeg only)
|
||||
AddBothPix=bool (default: false); add original & converted pic (for archival purposes)
|
||||
AllPixJPEG | AllPixPNG =bool (default: false); force conversion to a specific picture format
|
||||
SquareUp (include to square images to largest dimension, allows an [ugly] 160x1200->1200x1200)
|
||||
removeTempPix (include to delete temp pic files created when resizing images after tagging)
|
||||
ForceHeight=num (must also specify width, below) force image pixel height
|
||||
ForceWidth=num (must also specify height, above) force image pixel width
|
||||
|
||||
Examples: (bash-style)
|
||||
export PIC_OPTIONS="MaxDimensions=400:DPI=72:MaxKBytes=100:AddBothPix=true:AllPixJPEG=true"
|
||||
export PIC_OPTIONS="SquareUp:removeTempPix"
|
||||
export PIC_OPTIONS="ForceHeight=999:ForceWidth=333:removeTempPix"
|
||||
------------------------------------------------------------------------------------------------
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
60
atomicparsley/install.ps1
Normal file
60
atomicparsley/install.ps1
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
#########################
|
||||
# Install AtomicParsley #
|
||||
#########################
|
||||
|
||||
# Every package should define these variables
|
||||
$pkg_cmd_name = "AtomicParsley"
|
||||
|
||||
$pkg_dst_cmd = "$Env:USERPROFILE\.local\bin\AtomicParsley.exe"
|
||||
$pkg_dst_bin = "$Env:USERPROFILE\.local\bin"
|
||||
$pkg_dst = "$pkg_dst_cmd"
|
||||
|
||||
$pkg_src_cmd = "$Env:USERPROFILE\.local\opt\AtomicParsley-v$Env:WEBI_VERSION\bin\AtomicParsley.exe"
|
||||
$pkg_src_bin = "$Env:USERPROFILE\.local\opt\AtomicParsley-v$Env:WEBI_VERSION\bin"
|
||||
$pkg_src_dir = "$Env:USERPROFILE\.local\opt\AtomicParsley-v$Env:WEBI_VERSION"
|
||||
$pkg_src = "$pkg_src_cmd"
|
||||
|
||||
New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null
|
||||
$pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
|
||||
# Fetch archive
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) {
|
||||
echo "Checking for (or Installing) MSVC Runtime..."
|
||||
& "$Env:USERPROFILE\.local\bin\webi-pwsh.ps1" vcruntime
|
||||
|
||||
echo "Downloading AtomicParsley from $Env:WEBI_PKG_URL to $pkg_download"
|
||||
& curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& move "$pkg_download.part" "$pkg_download"
|
||||
}
|
||||
|
||||
IF (!(Test-Path -Path "$pkg_src_cmd")) {
|
||||
echo "Installing AtomicParsley"
|
||||
|
||||
# TODO: create package-specific temp directory
|
||||
# Enter tmp
|
||||
pushd .local\tmp
|
||||
|
||||
# Remove any leftover tmp cruft
|
||||
Remove-Item -Path ".\AtomicParsley-v*" -Recurse -ErrorAction Ignore
|
||||
Remove-Item -Path ".\AtomicParsley.exe" -Recurse -ErrorAction Ignore
|
||||
|
||||
# Unpack archive file into this temporary directory
|
||||
# Windows BSD-tar handles zip. Imagine that.
|
||||
echo "Unpacking $pkg_download"
|
||||
& tar xf "$pkg_download"
|
||||
|
||||
# Settle unpacked archive into place
|
||||
echo "Install Location: $pkg_src_cmd"
|
||||
New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null
|
||||
Move-Item -Path ".\AtomicParsley.exe" -Destination "$pkg_src_bin"
|
||||
|
||||
# Exit tmp
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'"
|
||||
Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null
|
||||
New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null
|
||||
Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
|
||||
41
atomicparsley/install.sh
Normal file
41
atomicparsley/install.sh
Normal file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -u
|
||||
|
||||
__init_atomicparsley() {
|
||||
|
||||
#########################
|
||||
# Install AtomicParsley #
|
||||
#########################
|
||||
|
||||
WEBI_SINGLE=true
|
||||
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="AtomicParsley"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/bin/AtomicParsley"
|
||||
pkg_dst="$pkg_dst_cmd"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/AtomicParsley-v$WEBI_VERSION/bin/AtomicParsley"
|
||||
pkg_src_dir="$HOME/.local/opt/AtomicParsley-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_cmd"
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
# ~/.local/opt/AtomicParsley-v20221229.172126.0/bin
|
||||
mkdir -p "$(dirname "$pkg_src_cmd")"
|
||||
|
||||
# mv ./AtomicParsley ~/.local/opt/AtomicParsley-v20221229.172126.0/bin/AtomicParsley
|
||||
mv ./"$pkg_cmd_name" "$pkg_src_cmd"
|
||||
}
|
||||
|
||||
pkg_get_current_version() {
|
||||
# 'AtomicParsley --version' has output in this format:
|
||||
# AtomicParsley version: 20221229.172126.0 d813aa6e0304ed3ab6d92f1ae96cd52b586181ec (utf8)
|
||||
# This trims it down to just the version number:
|
||||
# 20221229.172126.0
|
||||
AtomicParsley --version 2> /dev/null | head -n 1 | cut -d' ' -f3
|
||||
}
|
||||
}
|
||||
|
||||
__init_atomicparsley
|
||||
74
atomicparsley/releases.js
Normal file
74
atomicparsley/releases.js
Normal file
@@ -0,0 +1,74 @@
|
||||
'use strict';
|
||||
|
||||
var github = require('../_common/github.js');
|
||||
var owner = 'wez';
|
||||
var repo = 'atomicparsley';
|
||||
|
||||
let targets = {
|
||||
x86win: {
|
||||
os: 'windows',
|
||||
arch: 'x86',
|
||||
},
|
||||
x64win: {
|
||||
os: 'windows',
|
||||
arch: 'amd64',
|
||||
},
|
||||
x64mac: {
|
||||
os: 'macos',
|
||||
arch: 'amd64',
|
||||
},
|
||||
x64lin: {
|
||||
os: 'linux',
|
||||
arch: 'amd64',
|
||||
},
|
||||
x64musl: {
|
||||
os: 'linux',
|
||||
arch: 'amd64',
|
||||
_musl_native: true,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
for (let rel of all.releases) {
|
||||
let windows32 = rel.name.includes('WindowsX86.');
|
||||
if (windows32) {
|
||||
Object.assign(rel, targets.x86win);
|
||||
continue;
|
||||
}
|
||||
|
||||
let windows64 = rel.name.includes('Windows.');
|
||||
if (windows64) {
|
||||
Object.assign(rel, targets.x64win);
|
||||
continue;
|
||||
}
|
||||
|
||||
let macos64 = rel.name.includes('MacOS');
|
||||
if (macos64) {
|
||||
Object.assign(rel, targets.x64mac);
|
||||
continue;
|
||||
}
|
||||
|
||||
let musl64 = rel.name.includes('Alpine');
|
||||
if (musl64) {
|
||||
Object.assign(rel, targets.x64musl);
|
||||
continue;
|
||||
}
|
||||
|
||||
let lin64 = rel.name.includes('Linux.');
|
||||
if (lin64) {
|
||||
Object.assign(rel, targets.x64lin);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return all;
|
||||
});
|
||||
};
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
console.info(JSON.stringify(all));
|
||||
//console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
}
|
||||
@@ -56,8 +56,36 @@ server and desktop deployment, respectively.
|
||||
|
||||
To accomplish the same manually you would:
|
||||
|
||||
1. Create `~/.dashcore/dash.conf` with reasonable defaults
|
||||
1. Create `~/.dashcore/dash.conf` with
|
||||
[reasonable defaults](../packages/dashcore-utils/dash.example.conf)
|
||||
|
||||
```ini
|
||||
txindex=1
|
||||
addressindex=1
|
||||
timestampindex=1
|
||||
spentindex=1
|
||||
|
||||
[main]
|
||||
rpcuser=RPCUSER_MAIN
|
||||
rpcpassword=RPCPASS_MAIN
|
||||
# to run on multiple interfaces, use multiple config lines
|
||||
# ex: bind=127.0.0.1:9999 and bind=10.0.0.100:9999)
|
||||
bind=127.0.0.1:9999
|
||||
rpcbind=127.0.0.1:9998
|
||||
rpcconnect=127.0.0.1:9998
|
||||
rpcallowip=127.0.0.1/16
|
||||
# zmq* can only be bound to a single interface
|
||||
# See https://github.com/dashpay/dash/issues/5461
|
||||
zmqpubrawtx=tcp://127.0.0.1:28332
|
||||
zmqpubrawtxlock=tcp://127.0.0.1:28332
|
||||
zmqpubrawchainlock=tcp://127.0.0.1:28332
|
||||
zmqpubhashchainlock=tcp://127.0.0.1:28332
|
||||
|
||||
[test]
|
||||
# ...
|
||||
|
||||
[regtest]
|
||||
# ...
|
||||
```
|
||||
|
||||
Which is essentially the same as:
|
||||
|
||||
@@ -11,6 +11,7 @@ module.exports = function (request) {
|
||||
'armv6l',
|
||||
'armv7l',
|
||||
'ppc64le',
|
||||
'ppc64',
|
||||
's390x',
|
||||
'x86',
|
||||
];
|
||||
|
||||
@@ -21,14 +21,14 @@ ffmpeg -i input.m4a output.mp3
|
||||
```
|
||||
|
||||
Important information per https://johnvansickle.com/ffmpeg/release-readme.txt
|
||||
|
||||
> Notes: A limitation of statically linking `glibc` is the loss of DNS resolution. Installing `nscd` through your package manager will fix this.
|
||||
|
||||
*This is relevant if using ffmpeg to relay to an RTMP server via domain name.*
|
||||
> Notes: A limitation of statically linking `glibc` is the loss of DNS
|
||||
> resolution. Installing `nscd` through your package manager will fix this.
|
||||
|
||||
_This is relevant if using ffmpeg to relay to an RTMP server via domain name._
|
||||
|
||||
```sh
|
||||
# for example, this will not work without `nscd` installed.
|
||||
|
||||
ffmpeg -re -stream_loop -1 -i "FooBar.m4v" -c copy -f flv rtmp://stream.example.com/foo/bar
|
||||
```
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ set -e
|
||||
set -u
|
||||
|
||||
__run_go_essentials() {
|
||||
if command -v go 2> /dev/null; then
|
||||
"$HOME/.local/bin/webi" "golang@${WEBI_TAG}"
|
||||
if ! command -v go 2> /dev/null; then
|
||||
"$HOME/.local/bin/webi" "go@${WEBI_TAG}"
|
||||
fi
|
||||
|
||||
export PATH="$HOME/.local/opt/go/bin:$PATH"
|
||||
|
||||
@@ -5,7 +5,6 @@ set -u
|
||||
GOBIN="${HOME}/go"
|
||||
GOBIN_REAL="${HOME}/.local/opt/go-bin-v${WEBI_VERSION}"
|
||||
|
||||
# The package is 'golang', but the command is 'go'
|
||||
pkg_cmd_name="go"
|
||||
|
||||
# NOTE: pkg_* variables can be defined here
|
||||
|
||||
78
go/releases.js
Normal file
78
go/releases.js
Normal file
@@ -0,0 +1,78 @@
|
||||
'use strict';
|
||||
|
||||
var osMap = {
|
||||
darwin: 'macos',
|
||||
};
|
||||
var archMap = {
|
||||
386: 'x86',
|
||||
};
|
||||
|
||||
function getAllReleases(request) {
|
||||
/*
|
||||
{
|
||||
version: 'go1.13.8',
|
||||
stable: true,
|
||||
files: [
|
||||
{
|
||||
filename: 'go1.13.8.src.tar.gz',
|
||||
os: '',
|
||||
arch: '',
|
||||
version: 'go1.13.8',
|
||||
sha256:
|
||||
'b13bf04633d4d8cf53226ebeaace8d4d2fd07ae6fa676d0844a688339debec34',
|
||||
size: 21631178,
|
||||
kind: 'source'
|
||||
}
|
||||
]
|
||||
};
|
||||
*/
|
||||
return request({
|
||||
url: 'https://golang.org/dl/?mode=json&include=all',
|
||||
json: true,
|
||||
}).then((resp) => {
|
||||
var goReleases = resp.body;
|
||||
var all = {
|
||||
releases: [],
|
||||
download: 'https://dl.google.com/go/{{ download }}',
|
||||
};
|
||||
|
||||
goReleases.forEach((release) => {
|
||||
// strip 'go' prefix, standardize version
|
||||
var parts = release.version.slice(2).split('.');
|
||||
while (parts.length < 3) {
|
||||
parts.push('0');
|
||||
}
|
||||
var version = parts.join('.');
|
||||
|
||||
release.files.forEach((asset) => {
|
||||
var filename = asset.filename;
|
||||
var os = osMap[asset.os] || asset.os || '-';
|
||||
var arch = archMap[asset.arch] || asset.arch || '-';
|
||||
all.releases.push({
|
||||
version: version,
|
||||
// all go versions >= 1.0.0 are effectively LTS
|
||||
lts: (parts[0] > 0 && release.stable) || false,
|
||||
channel: (release.stable && 'stable') || 'beta',
|
||||
date: '1970-01-01', // the world may never know
|
||||
os: os,
|
||||
arch: arch,
|
||||
ext: '', // let normalize run the split/test/join
|
||||
hash: '-', // not ready to standardize this yet
|
||||
download: filename,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return all;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getAllReleases;
|
||||
|
||||
if (module === require.main) {
|
||||
getAllReleases(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
all.releases = all.releases.slice(0, 10);
|
||||
console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
---
|
||||
title: Golang Essentials (go-essentials alias)
|
||||
homepage: https://webinstall.dev/go-essentials
|
||||
tagline: |
|
||||
Alias for https://webinstall.dev/go-essentials
|
||||
alias: go-essentials
|
||||
description: |
|
||||
See https://webinstall.dev/go-essentials
|
||||
---
|
||||
|
||||
Alias for https://webinstall.dev/go-essentials
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/bin/pwsh
|
||||
|
||||
echo "'go@$Env:WEBI_TAG' is an alias for 'golang@$Env:WEBI_VERSION'"
|
||||
IF ($Env:WEBI_HOST -eq $null -or $Env:WEBI_HOST -eq "") { $Env:WEBI_HOST = "https://webinstall.dev" }
|
||||
curl.exe -fsSL "$Env:WEBI_HOST/golang@$Env:WEBI_VERSION" | powershell
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -u
|
||||
|
||||
__redirect_alias_golang() {
|
||||
echo "'go@${WEBI_TAG:-stable}' is an alias for 'golang@${WEBI_VERSION-}'"
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
curl -fsSL "$WEBI_HOST/golang@${WEBI_VERSION-}" | sh
|
||||
}
|
||||
|
||||
__redirect_alias_golang
|
||||
@@ -10,8 +10,7 @@ description: |
|
||||
|
||||
Alias for <https://webinstall.dev/go>.
|
||||
|
||||
To update or switch versions, run `webi go@stable` (or `@v1.21`, `@beta`,
|
||||
etc).
|
||||
To update or switch versions, run `webi go@stable` (or `@v1.21`, `@beta`, etc).
|
||||
|
||||
### Files
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ set -u
|
||||
GOBIN="${HOME}/go"
|
||||
GOBIN_REAL="${HOME}/.local/opt/go-bin-v${WEBI_VERSION}"
|
||||
|
||||
# The package is 'golang', but the command is 'go'
|
||||
pkg_cmd_name="go"
|
||||
|
||||
# NOTE: pkg_* variables can be defined here
|
||||
|
||||
@@ -1,78 +1,3 @@
|
||||
'use strict';
|
||||
|
||||
var osMap = {
|
||||
darwin: 'macos',
|
||||
};
|
||||
var archMap = {
|
||||
386: 'x86',
|
||||
};
|
||||
|
||||
function getAllReleases(request) {
|
||||
/*
|
||||
{
|
||||
version: 'go1.13.8',
|
||||
stable: true,
|
||||
files: [
|
||||
{
|
||||
filename: 'go1.13.8.src.tar.gz',
|
||||
os: '',
|
||||
arch: '',
|
||||
version: 'go1.13.8',
|
||||
sha256:
|
||||
'b13bf04633d4d8cf53226ebeaace8d4d2fd07ae6fa676d0844a688339debec34',
|
||||
size: 21631178,
|
||||
kind: 'source'
|
||||
}
|
||||
]
|
||||
};
|
||||
*/
|
||||
return request({
|
||||
url: 'https://golang.org/dl/?mode=json&include=all',
|
||||
json: true,
|
||||
}).then((resp) => {
|
||||
var goReleases = resp.body;
|
||||
var all = {
|
||||
releases: [],
|
||||
download: 'https://dl.google.com/go/{{ download }}',
|
||||
};
|
||||
|
||||
goReleases.forEach((release) => {
|
||||
// strip 'go' prefix, standardize version
|
||||
var parts = release.version.slice(2).split('.');
|
||||
while (parts.length < 3) {
|
||||
parts.push('0');
|
||||
}
|
||||
var version = parts.join('.');
|
||||
|
||||
release.files.forEach((asset) => {
|
||||
var filename = asset.filename;
|
||||
var os = osMap[asset.os] || asset.os || '-';
|
||||
var arch = archMap[asset.arch] || asset.arch || '-';
|
||||
all.releases.push({
|
||||
version: version,
|
||||
// all go versions >= 1.0.0 are effectively LTS
|
||||
lts: (parts[0] > 0 && release.stable) || false,
|
||||
channel: (release.stable && 'stable') || 'beta',
|
||||
date: '1970-01-01', // the world may never know
|
||||
os: os,
|
||||
arch: arch,
|
||||
ext: '', // let normalize run the split/test/join
|
||||
hash: '-', // not ready to standardize this yet
|
||||
download: filename,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
return all;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = getAllReleases;
|
||||
|
||||
if (module === require.main) {
|
||||
getAllReleases(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
all.releases = all.releases.slice(0, 10);
|
||||
console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
}
|
||||
module.exports = require('../go/releases.js');
|
||||
|
||||
64
hugo-extended/README.md
Normal file
64
hugo-extended/README.md
Normal file
@@ -0,0 +1,64 @@
|
||||
---
|
||||
title: Hugo Extended Edition
|
||||
homepage: https://github.com/gohugoio/hugo
|
||||
tagline: |
|
||||
Hugo, but with libsass and WebP support.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi hugo-extended@stable` (or `@v0.118.2`,
|
||||
`@beta`, etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```text
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/opt/hugo-extended/
|
||||
~/.local/bin/hugo
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> Hugo Extended Edition sacrifices some of the portability and memory-safety of
|
||||
> Go in order to include libsass and WebP support.
|
||||
|
||||
- **libsass** (as opposed to ["dartsass"](../sass/) - a.k.a. [sass](../sass/))
|
||||
- **WebP** encoding
|
||||
|
||||
If you DON'T need those, check out [Hugo](../hugo/) (Standard Edition).
|
||||
|
||||
### How to Switch Between Editions
|
||||
|
||||
If you've installed `hugo` and `hugo-extended` with Webi, you can switch easily:
|
||||
|
||||
```sh
|
||||
webi hugo
|
||||
```
|
||||
|
||||
```text
|
||||
switched to 'hugo v0.118.2':
|
||||
/Users/aj/.local/bin/hugo => /Users/aj/.local/opt/hugo-v0.118.2/bin/hugo
|
||||
```
|
||||
|
||||
```sh
|
||||
webi hugo-extended
|
||||
```
|
||||
|
||||
```text
|
||||
switched to 'hugo v0.118.2':
|
||||
/home/me/.local/bin/hugo => /home/me/.local/opt/hugo-extended-v0.118.2/bin/hugo
|
||||
```
|
||||
|
||||
### Why NOT Use Extended Edition?
|
||||
|
||||
The Standard Edition is written and compiled with Go, which means it's binaries:
|
||||
|
||||
- work on all OSes and architectures Go supports (musl, arm, BSD, etc)
|
||||
- are more secure against attacks (Go is memory-safe, C languages are not)
|
||||
- _slightly_ smaller file size (but... it doesn't really matter)
|
||||
|
||||
### [Hugo](../hugo/) Quick Start & Tips
|
||||
|
||||
See the [Hugo Cheat Sheet](../hugo/). See the [Hugo Cheat Sheet](../hugo/).
|
||||
57
hugo-extended/install.ps1
Normal file
57
hugo-extended/install.ps1
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
#########################
|
||||
# Install hugo-extended #
|
||||
#########################
|
||||
|
||||
# Every package should define these variables
|
||||
$pkg_cmd_name = "hugo"
|
||||
|
||||
$pkg_dst_cmd = "$Env:USERPROFILE\.local\bin\hugo.exe"
|
||||
$pkg_dst_bin = "$Env:USERPROFILE\.local\bin"
|
||||
$pkg_dst = "$pkg_dst_cmd"
|
||||
|
||||
$pkg_src_cmd = "$Env:USERPROFILE\.local\opt\hugo-extended-v$Env:WEBI_VERSION\bin\hugo.exe"
|
||||
$pkg_src_bin = "$Env:USERPROFILE\.local\opt\hugo-extended-v$Env:WEBI_VERSION\bin"
|
||||
$pkg_src_dir = "$Env:USERPROFILE\.local\opt\hugo-extended-v$Env:WEBI_VERSION"
|
||||
$pkg_src = "$pkg_src_cmd"
|
||||
|
||||
New-Item "$Env:USERPROFILE\Downloads\webi" -ItemType Directory -Force | out-null
|
||||
$pkg_download = "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE"
|
||||
|
||||
# Fetch archive
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\webi\$Env:WEBI_PKG_FILE")) {
|
||||
echo "Downloading hugo-extended from $Env:WEBI_PKG_URL to $pkg_download"
|
||||
& curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& move "$pkg_download.part" "$pkg_download"
|
||||
}
|
||||
|
||||
IF (!(Test-Path -Path "$pkg_src_cmd")) {
|
||||
echo "Installing hugo-extended"
|
||||
|
||||
# TODO: create package-specific temp directory
|
||||
# Enter tmp
|
||||
pushd .local\tmp
|
||||
|
||||
# Remove any leftover tmp cruft
|
||||
Remove-Item -Path ".\hugo-extended-v*" -Recurse -ErrorAction Ignore
|
||||
Remove-Item -Path ".\hugo.exe" -Recurse -ErrorAction Ignore
|
||||
|
||||
# Unpack archive file into this temporary directory
|
||||
# Windows BSD-tar handles zip. Imagine that.
|
||||
echo "Unpacking $pkg_download"
|
||||
& tar xf "$pkg_download"
|
||||
|
||||
# Settle unpacked archive into place
|
||||
echo "Install Location: $pkg_src_cmd"
|
||||
New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null
|
||||
Move-Item -Path ".\hugo.exe" -Destination "$pkg_src_bin"
|
||||
|
||||
# Exit tmp
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'"
|
||||
Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore | out-null
|
||||
New-Item "$pkg_dst_bin" -ItemType Directory -Force | out-null
|
||||
Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
|
||||
40
hugo-extended/install.sh
Normal file
40
hugo-extended/install.sh
Normal file
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
# "'pkg_cmd_name' appears unused. Verify it or export it."
|
||||
|
||||
__init_hugoextended() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
WEBI_SINGLE=true
|
||||
|
||||
# Every package should define these 6 variables
|
||||
pkg_cmd_name="hugo"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/bin/hugo"
|
||||
pkg_dst="$pkg_dst_cmd"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/hugo-extended-v$WEBI_VERSION/bin/hugo"
|
||||
pkg_src_dir="$HOME/.local/opt/hugo-extended-v$WEBI_VERSION/bin"
|
||||
pkg_src="$pkg_src_dir"
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
# ~/.local/opt/hugo-extended-v0.118.2/bin
|
||||
mkdir -p "$(dirname "${pkg_src_cmd}")"
|
||||
|
||||
# mv ./hugo ~/.local/opt/hugo-extended-v0.118.2/bin/
|
||||
mv ./hugo "${pkg_src_cmd}"
|
||||
}
|
||||
|
||||
pkg_get_current_version() {
|
||||
# 'hugo version' has output in this format:
|
||||
# hugo v0.118.2-da7983ac4b94d97d776d7c2405040de97e95c03d darwin/arm64 BuildDate=2023-08-31T11:23:51Z VendorInfo=gohugoio
|
||||
# This trims it down to just the version number:
|
||||
# 0.118.2
|
||||
hugo version 2> /dev/null | head -n 1 | cut -d' ' -f2 | cut -d '-' -f1 | sed 's:^v::'
|
||||
}
|
||||
}
|
||||
|
||||
__init_hugoextended
|
||||
35
hugo-extended/releases.js
Normal file
35
hugo-extended/releases.js
Normal file
@@ -0,0 +1,35 @@
|
||||
'use strict';
|
||||
|
||||
var github = require('../_common/github.js');
|
||||
var owner = 'gohugoio';
|
||||
var repo = 'hugo';
|
||||
|
||||
module.exports = async function (request) {
|
||||
let all = await github(request, owner, repo);
|
||||
|
||||
all.releases = all.releases.filter(function (rel) {
|
||||
let isExtended = rel.name.includes('_extended_');
|
||||
if (!isExtended) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// remove checksums and .deb
|
||||
for (let ignorableExt of ['.txt', '.deb']) {
|
||||
let isIgnorable = rel.name.endsWith(ignorableExt);
|
||||
if (isIgnorable) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
return all;
|
||||
};
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
console.info(JSON.stringify(all));
|
||||
});
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Hugo
|
||||
title: Hugo (Standard & Extended Editions)
|
||||
homepage: https://github.com/gohugoio/hugo
|
||||
tagline: |
|
||||
Hugo: The world’s fastest framework for building websites.
|
||||
@@ -8,11 +8,45 @@ tagline: |
|
||||
To update or switch versions, run `webi hugo@stable` (or `@v0.87`, `@beta`,
|
||||
etc).
|
||||
|
||||
### Files
|
||||
|
||||
These are the files / directories that are created and/or modified with this
|
||||
install:
|
||||
|
||||
```text
|
||||
~/.config/envman/PATH.env
|
||||
~/.local/opt/hugo/
|
||||
~/.local/bin/hugo
|
||||
```
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> Hugo is one of the most popular open-source static site generators. It makes
|
||||
> building websites fun again.
|
||||
|
||||
Hugo is a simple and fast Jamstack / Static Site Generator (SSG) tool, which
|
||||
comes in two flavors:
|
||||
|
||||
**Hugo Standard Edition**: Fast, Safe, & Runs Almost Everywhere
|
||||
|
||||
**Hugo Extended Edition**: Supports _libsass_ transpilation and _WebP_ encoding,
|
||||
but mixed with unsafe C code and available for fewer OSes and CPU architectures
|
||||
|
||||
### How to Pick & Switch Editions
|
||||
|
||||
You'll need [Hugo Extended Edition](../hugo-extended/) for:
|
||||
|
||||
- legacy `libsass` support - if you use templates that require it \
|
||||
(["dartsass"](../sass/), also known as just "sass", is supported in both)
|
||||
- **WebP** encoding
|
||||
|
||||
Use `webi hugo-extended` and `webi hugo` to switch between editions.
|
||||
|
||||
Use `hugo env` to determine which edition you're running (Extended Edition
|
||||
references _libsass_ and _WebP_ in the output).
|
||||
|
||||
See [hugo-extended](../hugo-extended/) tips specific to Hugo Extended Edition.
|
||||
|
||||
### Create a new site
|
||||
|
||||
```sh
|
||||
|
||||
@@ -1,14 +1,27 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -u
|
||||
|
||||
pkg_cmd_name="hugo"
|
||||
WEBI_SINGLE=true
|
||||
# shellcheck disable=SC2034
|
||||
# "'pkg_cmd_name' appears unused. Verify it or export it."
|
||||
|
||||
__init_hugo() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
################
|
||||
# Install hugo #
|
||||
################
|
||||
|
||||
pkg_cmd_name="hugo"
|
||||
WEBI_SINGLE=true
|
||||
|
||||
pkg_get_current_version() {
|
||||
# 'hugo version' has output in this format:
|
||||
# hugo v0.118.2-da7983ac4b94d97d776d7c2405040de97e95c03d darwin/arm64 BuildDate=2023-08-31T11:23:51Z VendorInfo=gohugoio
|
||||
# This trims it down to just the version number:
|
||||
# 0.118.2
|
||||
hugo version 2> /dev/null | head -n 1 | cut -d' ' -f2 | cut -d '-' -f1 | sed 's:^v::'
|
||||
}
|
||||
|
||||
pkg_get_current_version() {
|
||||
# 'hugo version' has output in this format:
|
||||
# Hugo Static Site Generator v0.72.0-8A7EF3CF darwin/amd64 BuildDate: 2020-05-31T12:07:44Z
|
||||
# This trims it down to just the version number:
|
||||
# 0.72.0
|
||||
hugo version 2> /dev/null | head -n 1 | cut -d' ' -f5 | cut -d '-' -f1 | sed 's:^v::'
|
||||
}
|
||||
|
||||
__init_hugo
|
||||
|
||||
@@ -4,14 +4,27 @@ var github = require('../_common/github.js');
|
||||
var owner = 'gohugoio';
|
||||
var repo = 'hugo';
|
||||
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
module.exports = async function (request) {
|
||||
let all = await github(request, owner, repo);
|
||||
|
||||
all.releases = all.releases.filter(function (rel) {
|
||||
let isExtended = rel.name.includes('_extended_');
|
||||
if (isExtended) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// remove checksums and .deb
|
||||
all.releases = all.releases.filter(function (rel) {
|
||||
return !/(\.txt)|(\.deb)$/i.test(rel.name);
|
||||
});
|
||||
return all;
|
||||
for (let ignorableExt of ['.txt', '.deb']) {
|
||||
let isIgnorable = rel.name.endsWith(ignorableExt);
|
||||
if (isIgnorable) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
return all;
|
||||
};
|
||||
|
||||
if (module === require.main) {
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
function getRawReleases(request) {
|
||||
return request({ url: 'https://iterm2.com/downloads.html' }).then(function (
|
||||
resp,
|
||||
) {
|
||||
var links = resp.body
|
||||
.split(/[<>]+/g)
|
||||
.map(function (str) {
|
||||
var m = str.match(/href="(https:\/\/iterm2\.com\/downloads\/.*\.zip)"/);
|
||||
if (m && /iTerm2-[34]/.test(m[1])) {
|
||||
return m[1];
|
||||
}
|
||||
})
|
||||
.filter(Boolean);
|
||||
return links;
|
||||
});
|
||||
return request({ url: 'https://iterm2.com/downloads.html' }).then(
|
||||
function (resp) {
|
||||
var links = resp.body
|
||||
.split(/[<>]+/g)
|
||||
.map(function (str) {
|
||||
var m = str.match(
|
||||
/href="(https:\/\/iterm2\.com\/downloads\/.*\.zip)"/,
|
||||
);
|
||||
if (m && /iTerm2-[34]/.test(m[1])) {
|
||||
return m[1];
|
||||
}
|
||||
})
|
||||
.filter(Boolean);
|
||||
return links;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
function transformReleases(links) {
|
||||
|
||||
1
msvc-runtime
Symbolic link
1
msvc-runtime
Symbolic link
@@ -0,0 +1 @@
|
||||
vcruntime
|
||||
1
msvcruntime
Symbolic link
1
msvcruntime
Symbolic link
@@ -0,0 +1 @@
|
||||
vcruntime
|
||||
@@ -91,22 +91,23 @@ console.log(list.join('\n -'));
|
||||
Note: This will _NOT_ work in Command.exe. You must get _Windows Terminal_ from
|
||||
the Microsoft Store.
|
||||
|
||||
You can update the font in the Windows Terminal settings either for the "Defaults" profile (which applies to all profiles unless overwritten) or individually for different profiles under `Settings -> <profile_name> -> Appearance -> Font face`:
|
||||
You can update the font in the Windows Terminal settings either for the
|
||||
"Defaults" profile (which applies to all profiles unless overwritten) or
|
||||
individually for different profiles under
|
||||
`Settings -> <profile_name> -> Appearance -> Font face`:
|
||||
|
||||

|
||||

|
||||
(Screenshots taken with Windows Terminal version 1.16.10262.0)
|
||||
|
||||
Additionally, you can update `profiles.defaults.font.face` in the Windows Terminal settings.json directly:
|
||||
Additionally, you can update `profiles.defaults.font.face` in the Windows
|
||||
Terminal settings.json directly:
|
||||
|
||||
```json
|
||||
{
|
||||
"profiles":
|
||||
{
|
||||
"defaults":
|
||||
{
|
||||
"font":
|
||||
{
|
||||
"profiles": {
|
||||
"defaults": {
|
||||
"font": {
|
||||
"face": "DroidSansMono NF"
|
||||
}
|
||||
}
|
||||
|
||||
33
package-lock.json
generated
33
package-lock.json
generated
@@ -1,23 +1,42 @@
|
||||
{
|
||||
"name": "@webinstall/webi-installers",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@root/request": {
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@webinstall/webi-installers",
|
||||
"version": "1.0.0",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@root/request": "^1.9.2",
|
||||
"dotenv": "^8.2.0",
|
||||
"marked": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@root/request": {
|
||||
"version": "1.9.2",
|
||||
"resolved": "https://registry.npmjs.org/@root/request/-/request-1.9.2.tgz",
|
||||
"integrity": "sha512-wVaL9yVV9oDR9UNbPZa20qgY+4Ch6YN8JUkaE4el/uuS5dmhD8Lusm/ku8qJVNtmQA56XLzEDCRS6/vfpiHK2A=="
|
||||
},
|
||||
"dotenv": {
|
||||
"node_modules/dotenv": {
|
||||
"version": "8.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz",
|
||||
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw=="
|
||||
"integrity": "sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==",
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"marked": {
|
||||
"node_modules/marked": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz",
|
||||
"integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw=="
|
||||
"integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==",
|
||||
"bin": {
|
||||
"marked": "bin/marked.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
package.json
15
package.json
@@ -1,15 +1,18 @@
|
||||
{
|
||||
"name": "@webinstall/webi-installers",
|
||||
"private": true,
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "webinstall script repository",
|
||||
"main": "_webi/",
|
||||
"scripts": {
|
||||
"fmt": "npm run prettier; npm run shfmt",
|
||||
"lint": "npx jshint@2.x -c ./.jshintrc */*.js",
|
||||
"prettier": "npx prettier@2.x -w '**/*.{js,md,html}'",
|
||||
"shfmt": "shfmt -w -i 4 -sr -ci -s ./",
|
||||
"test": "node _webi/test.js ./node/"
|
||||
"fmt": "npm run prettier && npm run shfmt",
|
||||
"lint": "npm run shellcheck && npm run jshint",
|
||||
"test": "node _webi/test.js ./node/",
|
||||
"----": "------------------------------------",
|
||||
"jshint": "npx -p jshint@2.x -- jshint -c ./.jshintrc --exclude 'node_modules/**/*' */*.js */*/*.js",
|
||||
"prettier": "npx -p prettier@3.x -- prettier -w '**/*.{js,md,html}'",
|
||||
"shellcheck": "shellcheck -s sh -S style --exclude=SC2154,SC2034 */*.sh",
|
||||
"shfmt": "shfmt -w -i 4 -sr -ci -s ./"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
3
package.json.extra
Normal file
3
package.json.extra
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
"tsc": "npx -p typescript@5 -- tsc -p ./jsconfig.json"
|
||||
"lint": "npm run jshint && npm run tsc",
|
||||
@@ -46,7 +46,7 @@ IF (!(Test-Path -Path "$pkg_src_cmd"))
|
||||
# Settle unpacked archive into place
|
||||
echo "Install Location: $pkg_src_cmd"
|
||||
New-Item "$pkg_src_bin" -ItemType Directory -Force | out-null
|
||||
Move-Item -Path ".\rclone.exe" -Destination "$pkg_src_bin"
|
||||
Move-Item -Path ".\rclone-v*\rclone.exe" -Destination "$pkg_src_bin"
|
||||
|
||||
# Exit tmp
|
||||
popd
|
||||
|
||||
@@ -28,7 +28,7 @@ curl -H "Host: example.com" http://localhost:3000
|
||||
```
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<h1>Example Domain</h1>
|
||||
|
||||
@@ -11,10 +11,9 @@ To update or switch versions, run `webi sttr@stable` (or `@v0.2.16` etc).
|
||||
|
||||
> `sttr` makes it easy to perform various operations on string.
|
||||
|
||||
|
||||
## Basic Usage
|
||||
|
||||
* After installation simply run `sttr` command.
|
||||
- After installation simply run `sttr` command.
|
||||
|
||||
```sh
|
||||
// For interactive menu
|
||||
@@ -25,7 +24,7 @@ sttr
|
||||
// Can also press UP-Down arrows select various operations.
|
||||
```
|
||||
|
||||
* Working with help.
|
||||
- Working with help.
|
||||
|
||||
```sh
|
||||
sttr -h
|
||||
@@ -35,7 +34,7 @@ sttr zeropad -h
|
||||
sttr md5 -h
|
||||
```
|
||||
|
||||
* Working with files input.
|
||||
- Working with files input.
|
||||
|
||||
```sh
|
||||
sttr {command-name} {filename}
|
||||
@@ -45,22 +44,22 @@ sttr md5 file.txt
|
||||
sttr md-html Readme.md
|
||||
```
|
||||
|
||||
* Writing output to file.
|
||||
- Writing output to file.
|
||||
|
||||
```sh
|
||||
sttr yaml-json file.yaml > file-output.json
|
||||
```
|
||||
|
||||
* Taking input from other command.
|
||||
- Taking input from other command.
|
||||
|
||||
```sh
|
||||
curl https: //jsonplaceholder.typicode.com/users | sttr json-yaml
|
||||
```
|
||||
|
||||
* Chaining the different processor.
|
||||
- Chaining the different processor.
|
||||
|
||||
```sh
|
||||
sttr md5 hello | sttr base64-encode
|
||||
|
||||
echo "Hello World" | sttr base64-encode | sttr md5
|
||||
```
|
||||
```
|
||||
|
||||
1
vc-runtime
Symbolic link
1
vc-runtime
Symbolic link
@@ -0,0 +1 @@
|
||||
vcruntime
|
||||
40
vcruntime/README.md
Normal file
40
vcruntime/README.md
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
title: Microsoft Visual C++ Redistributable
|
||||
homepage: https://learn.microsoft.com/search/?terms=redist
|
||||
tagline: |
|
||||
MSVC Runtime: The 25mb of Windows that Microsoft just won't install for you.
|
||||
---
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> execution cannot proceed run because `vcruntime140.dll` was not found
|
||||
|
||||
You pretty much can't run any freely available programs on Windows without the
|
||||
MSVC Runtime and yet, for some reason, Microsoft won't include it for you, and
|
||||
won't make it easy for those developers to understand how, or
|
||||
[whether or not they're even allowed](https://learn.microsoft.com/en-us/cpp/windows/redistributing-visual-cpp-files?view=msvc-170#redistributable-files-and-licensing),
|
||||
to actually redistribute it with their applications.
|
||||
|
||||
### How to Install the MSVC Runtime Manually
|
||||
|
||||
https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170
|
||||
|
||||
1. Download the official MSVC Runtime:
|
||||
|
||||
```pwsh
|
||||
# For Legacy x86_64 (amd64) systems:
|
||||
curl.exe -o vcredist.exe -L https://aka.ms/vs/17/release/vc_redist.x64.exe
|
||||
|
||||
# For modern ARM64 systems:
|
||||
curl.exe -o vcredist.exe -L https://aka.ms/vs/17/release/vc_redist.arm64.exe
|
||||
```
|
||||
|
||||
2. Install the redistributable
|
||||
```pwsh
|
||||
vcredist.exe /install /quiet /passive /norestart
|
||||
```
|
||||
|
||||
If you prefer to see a visual progress bar you can remove `/quiet`, and if you
|
||||
prefer to click next a few times for good 'ol times' sake you can remove
|
||||
`/passive`, and if you prefer the nostalgia of rebooting your computer after
|
||||
every install, remove the `/norestart`.
|
||||
39
vcruntime/install.ps1
Normal file
39
vcruntime/install.ps1
Normal file
@@ -0,0 +1,39 @@
|
||||
# This is the canonical CPU arch when the process is emulated
|
||||
$my_arch = "$Env:PROCESSOR_ARCHITEW6432"
|
||||
IF ($my_arch -eq $null -or $my_arch -eq "") {
|
||||
# This is the canonical CPU arch when the process is native
|
||||
$my_arch = "$Env:PROCESSOR_ARCHITECTURE"
|
||||
}
|
||||
IF ($my_arch -eq "AMD64") {
|
||||
# Because PowerShell isn't ARM yet.
|
||||
# See https://oofhours.com/2020/02/04/powershell-on-windows-10-arm64/
|
||||
$my_os_arch = wmic os get osarchitecture
|
||||
|
||||
# Using -clike because of the trailing newline
|
||||
IF ($my_os_arch -clike "ARM 64*") {
|
||||
$my_arch = "ARM64"
|
||||
}
|
||||
}
|
||||
# See also https://github.com/microsoft/winget-pkgs/issues/55576#issuecomment-1529331106
|
||||
|
||||
if (-not (Test-Path "$Env:USERPROFILE\Downloads\webi\vcredist.exe")) {
|
||||
IF ($my_arch -eq "ARM64") {
|
||||
curl.exe -o "$Env:USERPROFILE\Downloads\webi\vcredist.exe.part" -L https://aka.ms/vs/17/release/vc_redist.arm64.exe
|
||||
} ELSE {
|
||||
curl.exe -o "$Env:USERPROFILE\Downloads\webi\vcredist.exe.part" -L https://aka.ms/vs/17/release/vc_redist.x64.exe
|
||||
}
|
||||
& move "$Env:USERPROFILE\Downloads\webi\vcredist.exe.part" "$Env:USERPROFILE\Downloads\webi\vcredist.exe"
|
||||
}
|
||||
|
||||
# TODO How to use CSIDL_SYSTEM?
|
||||
# (https://learn.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables)
|
||||
if (-not (Test-Path "\Windows\System32\vcruntime140.dll")) {
|
||||
echo ""
|
||||
echo "Installing Microsoft Visual C++ Redistributable (vcruntime140.dll)..."
|
||||
echo ""
|
||||
& "$Env:USERPROFILE\Downloads\webi\vcredist.exe" /install /quiet /passive /norestart
|
||||
} ELSE {
|
||||
echo ""
|
||||
echo "Found Microsoft Visual C++ Redistributable (vcruntime140.dll)"
|
||||
echo ""
|
||||
}
|
||||
2
vcruntime/install.sh
Executable file
2
vcruntime/install.sh
Executable file
@@ -0,0 +1,2 @@
|
||||
echo >&2 "vcruntime140.dll is only for Windows"
|
||||
exit 1
|
||||
1
vcruntime140
Symbolic link
1
vcruntime140
Symbolic link
@@ -0,0 +1 @@
|
||||
vcruntime
|
||||
@@ -15,10 +15,10 @@ __init_vim_airline_themes() {
|
||||
mkdir -p ~/.vim/plugins
|
||||
if [ -f "$HOME/.vim/plugins/airline.vim" ]; then
|
||||
WEBI_HOST=${WEBI_HOST:-"https://webinstall.dev"}
|
||||
if ! grep -qF "let g:airline_theme=" $HOME/.vim/plugins/airline.vim; then
|
||||
if ! grep -qF "let g:airline_theme=" "$HOME/.vim/plugins/airline.vim"; then
|
||||
echo ""
|
||||
echo "set theme 'simple' as default, update in $HOME/.vim/plugins/airline.vim"
|
||||
curl -s "$WEBI_HOST/packages/vim-airline-themes/airline.vim" >> $HOME/.vim/plugins/airline.vim
|
||||
curl -s "$WEBI_HOST/packages/vim-airline-themes/airline.vim" >> "$HOME/.vim/plugins/airline.vim"
|
||||
fi
|
||||
else
|
||||
curl -fsSL -o ~/.vim/plugins/airline.vim "$WEBI_HOST/packages/vim-airline-themes/airline.vim"
|
||||
|
||||
@@ -33,4 +33,5 @@ set statusline+=\ %{LinterStatus()}
|
||||
" how to show error message
|
||||
let g:ale_echo_msg_error_str = 'E'
|
||||
let g:ale_echo_msg_warning_str = 'W'
|
||||
let g:ale_echo_msg_format = '[%linter%] %s [%severity%]'
|
||||
let g:ale_echo_msg_info_str = 'i'
|
||||
let g:ale_echo_msg_format = '[%linter%] %code%: %s [%severity%]'
|
||||
|
||||
@@ -23,7 +23,6 @@ install:
|
||||
>
|
||||
> 1. A drop-in cross-compiling toolchain for C and C++ (and Rust and CGo for
|
||||
> that matter).
|
||||
>
|
||||
> 2. A general purpose systems programming language, like C, but intentional,
|
||||
> and with benefit of hindsight.
|
||||
>
|
||||
|
||||
@@ -26,7 +26,7 @@ module.exports = function (request) {
|
||||
|
||||
// Ex: aarch64-macos => ['aarch64', 'macos']
|
||||
let parts = platform.split('-');
|
||||
let arch = parts[0];
|
||||
//let arch = parts[0];
|
||||
let os = parts[1];
|
||||
if (parts.length > 2) {
|
||||
console.warn(
|
||||
|
||||
Reference in New Issue
Block a user