move tools in respective subdirs
This commit is contained in:
parent
9bfafaeca4
commit
e740476232
23
README.md
23
README.md
|
@ -110,7 +110,28 @@ Usage example:
|
||||||
|
|
||||||
#### 4.1 `howlong`
|
#### 4.1 `howlong`
|
||||||
|
|
||||||
Adds https://howlongtobeat.com/ game length (`MainGame`) and an ID to your front matter, provided you first added a property called `game_name`. (This gets substituted).
|
Adds https://howlongtobeat.com/ game length (`MainGame`) and an ID to your front matter (keys `howlongtobeat_id` and `howlongtobeat_hrs`), provided you first added a property called `game_name`. (This gets substituted).
|
||||||
|
|
||||||
|
So, Frontmatter like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
title: Diablo 3 my Review
|
||||||
|
game_name: Diablo 3
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
Gets subsituted by something like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
---
|
||||||
|
title: Diablo 3 my Review
|
||||||
|
howlongtobeat_id: 62129
|
||||||
|
howlongtobeat_hrs: 20.5
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
In your Hugo template, add a link to `https://howlongtobeat.com/game?id={howlongtobeat_id}` and you're all set!
|
||||||
|
|
||||||
Usage example:
|
Usage example:
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const hltb = require('howlongtobeat')
|
const hltb = require('howlongtobeat')
|
||||||
const hltbService = new hltb.HowLongToBeatService()
|
const hltbService = new hltb.HowLongToBeatService()
|
||||||
|
|
||||||
const { getFiles } = require('./file-utils');
|
const { getFiles } = require('./../file-utils');
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
|
|
||||||
const {promisify} = require('util');
|
const {promisify} = require('util');
|
|
@ -1,7 +1,7 @@
|
||||||
const { parseMastoFeed } = require('./masto-feed-parser')
|
const { parseMastoFeed } = require('./mastodon/feed-parser')
|
||||||
const { widgetify } = require('./goodreads-widgetify.js')
|
const { widgetify } = require('./goodreads/widgetify.js')
|
||||||
const { buildIndex } = require('./lunr-index-builder.js')
|
const { buildIndex } = require('./lunr/index-builder.js')
|
||||||
const { howlong } = require('./howlong-tobeat.js')
|
const { howlong } = require('./howlongtobeat/howlong.js')
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mastodon: {
|
mastodon: {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const fs = require('fs').promises;
|
const fs = require('fs').promises;
|
||||||
const { getFiles } = require('./file-utils');
|
const { getFiles } = require('./../file-utils');
|
||||||
const { promisify } = require('util');
|
const { promisify } = require('util');
|
||||||
const frontMatterParser = require('parser-front-matter');
|
const frontMatterParser = require('parser-front-matter');
|
||||||
|
|
|
@ -2,7 +2,7 @@ const got = require("got");
|
||||||
const parser = require("fast-xml-parser");
|
const parser = require("fast-xml-parser");
|
||||||
const { writeFileSync, existsSync, mkdirSync } = require('fs');
|
const { writeFileSync, existsSync, mkdirSync } = require('fs');
|
||||||
const ent = require('ent')
|
const ent = require('ent')
|
||||||
const { getFiles } = require('./file-utils');
|
const { getFiles } = require('./../file-utils');
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
dayjs.extend(utc)
|
dayjs.extend(utc)
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
jest.mock('https')
|
jest.mock('https')
|
||||||
const { widgetify } = require('../src/goodreads-widgetify')
|
const { widgetify } = require('../../src/goodreads/widgetify')
|
||||||
|
|
||||||
test("goodreads-widgetify changes from lowres to hires images", async () => {
|
test("goodreads-widgetify changes from lowres to hires images", async () => {
|
||||||
const result = await widgetify("fake")
|
const result = await widgetify("fake")
|
|
@ -1,9 +1,9 @@
|
||||||
jest.mock('howlongtobeat')
|
jest.mock('howlongtobeat')
|
||||||
|
|
||||||
const { howlong } = require('../src/howlong-tobeat.js')
|
const { howlong } = require('../../src/howlongtobeat/howlong.js')
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const fsp = require('fs').promises;
|
const fsp = require('fs').promises;
|
||||||
const { rmdir } = require('./utils')
|
const { rmdir } = require('./../utils')
|
||||||
|
|
||||||
const mdsample = `---
|
const mdsample = `---
|
||||||
title: "wizardry 8 review"
|
title: "wizardry 8 review"
|
|
@ -1,4 +1,4 @@
|
||||||
const { buildIndex } = require('../src/lunr-index-builder')
|
const { buildIndex } = require('../../src/lunr/index-builder')
|
||||||
|
|
||||||
let result = null
|
let result = null
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const fsp = require('fs').promises;
|
const fsp = require('fs').promises;
|
||||||
const { rmdir } = require('./utils')
|
const { rmdir } = require('./../utils')
|
||||||
|
|
||||||
const frontMatterParser = require('parser-front-matter');
|
const frontMatterParser = require('parser-front-matter');
|
||||||
|
|
||||||
jest.mock('got');
|
jest.mock('got');
|
||||||
|
|
||||||
const { parseMastoFeed } = require('../src/masto-feed-parser')
|
const { parseMastoFeed } = require('../../src/mastodon/feed-parser')
|
||||||
const dumpdir = `${__dirname}/dump`
|
const dumpdir = `${__dirname}/dump`
|
||||||
|
|
||||||
describe("mastodon feed parser tests", () => {
|
describe("mastodon feed parser tests", () => {
|
Loading…
Reference in New Issue