Skip to content

Commit ce37c5a

Browse files
committed
Initial version
0 parents  commit ce37c5a

13 files changed

Lines changed: 1100 additions & 0 deletions

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: build
2+
3+
on:
4+
push:
5+
# all branches
6+
pull_request:
7+
# all branches
8+
9+
# This enables the Run Workflow button on the Actions tab.
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Install Opendylan
20+
uses: dylan-lang/install-opendylan@v3
21+
22+
- name: Download dependencies
23+
run: dylan update
24+
25+
- name: Build tests
26+
run: dylan build --all
27+
28+
- name: Upload artifact
29+
uses: actions/upload-artifact@v4
30+
with:
31+
path: |
32+
_build/bin/
33+
_build/lib/

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# backup files
2+
*~
3+
*.bak
4+
.DS_Store
5+
6+
# project file
7+
*.hdp
8+
9+
# documentation build directory
10+
build/
11+
12+
# compiler build directory
13+
_build/
14+
15+
# dylan tool package cache
16+
_packages/
17+
18+
# package registry folder
19+
registry/

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# pacman-vs-jekyll
2+
Convert your Opendylan's pacman catalog to a Jekyll website
3+
4+
## Usage
5+
6+
```
7+
pacman-vs-jekyll
8+
```
9+
10+
If used without parameters it will create a directory called
11+
`pacman-catalog-website` in the working directory. The program will
12+
populate the directory with a Jekyll website listing all packages in
13+
the catalog.
14+
15+
```
16+
pacman-vs-jekyll -h
17+
```
18+
19+
to see the usage
20+
21+
## Install
22+
23+
1. Clone the repository
24+
25+
```
26+
git clone https://github.com/fraya/pacman-vs-jekyll
27+
```
28+
29+
2. Enter the repository directory
30+
31+
```
32+
cd pacman-vs-jekyll
33+
```
34+
35+
3. Update the project dependencies
36+
37+
38+
```
39+
dylan update
40+
```
41+
42+
4. Build
43+
44+
```
45+
dylan build --all
46+
```

dylan-package.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "pacman-vs-jekyll",
3+
"description": "Create a Jekyll website from Dylan's PACMAN catalog",
4+
"category": "utilities",
5+
"keywords": [ "website", "pacman-catalog" ],
6+
"version": "0.1.0",
7+
"contact": "fernandoraya at gmail",
8+
"url": "https://github.com/fraya/pacman-vs-jekyll",
9+
"license": "GPL-3",
10+
"license-url": "https://www.gnu.org/licenses/gpl-3.0-standalone.html",
11+
"dependencies": [
12+
"command-line-parser@3.2.0",
13+
"dylan-tool@0.11.0"
14+
],
15+
"dev-dependencies": [
16+
"testworks@3.2.0"
17+
]
18+
}

source/library.dylan

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Module: dylan-user
2+
3+
define library pacman-vs-jekyll
4+
use common-dylan;
5+
use dylan;
6+
use dylan-tool;
7+
use io;
8+
use system;
9+
10+
export
11+
pacman-vs-jekyll,
12+
pacman-vs-jekyll-impl;
13+
end library;
14+
15+
define module pacman-vs-jekyll
16+
create
17+
build-website;
18+
end module;
19+
20+
define module pacman-vs-jekyll-impl
21+
use common-dylan;
22+
23+
// dylan library
24+
use threads;
25+
26+
// dylan-tool library
27+
use pacman;
28+
29+
// io library
30+
use format;
31+
use format-out;
32+
use print;
33+
use streams;
34+
35+
// system library
36+
use file-system;
37+
use locators;
38+
39+
use pacman-vs-jekyll;
40+
41+
end module;
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Module: dylan-user
2+
Synopsis: Pacman-vs-jekyll application library
3+
4+
define library pacman-vs-jekyll-app
5+
use common-dylan;
6+
use command-line-parser;
7+
use dylan-tool;
8+
use io;
9+
use system;
10+
11+
use pacman-vs-jekyll;
12+
end library;
13+
14+
define module pacman-vs-jekyll-app
15+
use common-dylan;
16+
17+
// command-line-parser library
18+
use command-line-parser;
19+
20+
// dylan-tool library
21+
use pacman;
22+
23+
// io library
24+
use format;
25+
use format-out;
26+
use print;
27+
use standard-io;
28+
29+
// system library
30+
use locators;
31+
32+
use pacman-vs-jekyll;
33+
end module;

source/pacman-vs-jekyll-app.dylan

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Module: pacman-vs-jekyll-app
2+
3+
define constant $app-help
4+
= "%s creates a Jekyll website from Opendylan's package catatalog.";
5+
6+
define command-line <app-command-line> ()
7+
option app-directory :: <string>,
8+
names: #("output", "o"),
9+
kind: <parameter-option>,
10+
default: "pacman-catalog-website",
11+
help: "Output directory (Default: %default%)";
12+
end command-line;
13+
14+
define function app-command-line
15+
(app-name :: <string>, arguments :: <vector>)
16+
=> (cmd :: <app-command-line>)
17+
let app-help = format-to-string($app-help, app-name);
18+
let command-line = make(<app-command-line>, help: app-help);
19+
20+
parse-command-line(command-line, arguments);
21+
command-line
22+
end;
23+
24+
define function main
25+
(name :: <string>, arguments :: <vector>)
26+
block ()
27+
let command-line = app-command-line(name, arguments);
28+
let base-directory = as(<directory-locator>, command-line.app-directory);
29+
let pacman-catalog = catalog();
30+
31+
build-website(base-directory, pacman-catalog);
32+
exit-application(0);
33+
exception (err :: <error>)
34+
format-err("Error: %s\n", err);
35+
exit-application(1);
36+
end block;
37+
end function;
38+
39+
main(application-name(), application-arguments());

source/pacman-vs-jekyll-app.lid

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Library: pacman-vs-jekyll-app
2+
Files: pacman-vs-jekyll-app-library.dylan
3+
pacman-vs-jekyll-app.dylan
4+
Target-Type: executable

0 commit comments

Comments
 (0)