Merge remote-tracking branch 'upstream/master'

master
hughbarney 2021-02-04 19:47:47 +00:00
commit 0941874983
8 changed files with 48 additions and 5 deletions

View File

@ -2315,7 +2315,7 @@
"name": "File manager", "name": "File manager",
"shortName":"FileManager", "shortName":"FileManager",
"icon": "icons8-filing-cabinet-48.png", "icon": "icons8-filing-cabinet-48.png",
"version":"0.02", "version":"0.03",
"description": "Simple file manager, allows user to examine watch storage and display, load or delete individual files", "description": "Simple file manager, allows user to examine watch storage and display, load or delete individual files",
"tags": "tools", "tags": "tools",
"readme": "README.md", "readme": "README.md",
@ -2739,6 +2739,17 @@
{"name":"tapelaunch.app.js","url":"app.js"}, {"name":"tapelaunch.app.js","url":"app.js"},
{"name":"tapelaunch.img","url":"icon.js","evaluate":true} {"name":"tapelaunch.img","url":"icon.js","evaluate":true}
] ]
},
{ "id": "oblique",
"name": "Oblique Strategies",
"icon": "eno.png",
"version": "0.01",
"description": "Oblique Strategies for creativity. Copied from Brian Eno.",
"tags": "tool",
"storage": [
{"name":"oblique.app.js","url":"app.js"},
{"name":"oblique.img","url":"app-icon.js","evaluate":true}
]
} }
] ]

View File

@ -155,6 +155,7 @@
// TODO: "no-undef": "warn", // TODO: "no-undef": "warn",
"no-undef": "off", "no-undef": "off",
"no-unused-vars": "off", "no-unused-vars": "off",
"no-useless-escape": "off" "no-useless-escape": "off",
"no-control-regex" : "off"
} }
} }

View File

@ -141,7 +141,7 @@ function downloadTrack(trackid, callback) {
function getTrackList() { function getTrackList() {
Util.showModal("Loading Tracks..."); Util.showModal("Loading Tracks...");
domTracks.innerHTML = ""; domTracks.innerHTML = "";
Puck.eval(`require("Storage").list(/banglerun_.*\\1/).map(fn=>{fn=fn.slice(0,-1);var f=require("Storage").open(fn,"r");f.readLine();return fn+","+f.readLine()})`,trackLines=>{ Puck.eval(`require("Storage").list(/banglerun_.*\\x01/).map(fn=>{fn=fn.slice(0,-1);var f=require("Storage").open(fn,"r");f.readLine();return fn+","+f.readLine()})`,trackLines=>{
var html = `<div class="container"> var html = `<div class="container">
<div class="columns">\n`; <div class="columns">\n`;
trackLines.forEach(l => { trackLines.forEach(l => {

View File

@ -1,2 +1,3 @@
0.01: New app! 0.01: New app!
0.02: Improve handling of large amounts of files (fix #579) 0.02: Improve handling of large amounts of files (fix #579)
0.03: Update RegExp use (Was using backreference instead of character code)

View File

@ -91,8 +91,8 @@ function drawMenu() {
function get_pruned_file_list() { function get_pruned_file_list() {
// get storagefile list // get storagefile list
var sf = STOR.list(/\1$/).map(s=>s.slice(0,-1)); var sf = STOR.list(/\x01$/).map(s=>s.slice(0,-1));
var sffilter = f=>!sf.includes(f.slice(0,-1)) || f.endsWith("\1"); var sffilter = f=>!sf.includes(f.slice(0,-1)) || f.endsWith("\x01");
// get files - put '.' last // get files - put '.' last
var fl = STOR.list(/^[^\.]/).filter(sffilter); var fl = STOR.list(/^[^\.]/).filter(sffilter);
fl.sort(); fl.sort();

1
apps/oblique/app-icon.js Normal file
View File

@ -0,0 +1 @@
require("heatshrink").decompress(atob("mEwwkE/4A///zmfzn4fbDhQqBAAQMHj4XJ+SQGh4MDl4vKgMRAAgXEF5X/iAXWkEQIoQ0BC4kTC5UwC4cAC4sSC5XxgIXJkJwDPBAXJiCQCmbEGC5kTn7PBC4vzkMRC5UQgUikYuFmILBC5SwCVYMikMSmf/gaPLEYMBMQMwW4fzgUyL5YwCkQLBAATKBmJfMiIlBB4Q1BBYPwC5oZCiMSOgKUB+RHMkQlBN4MjCYMDC50jiMzgMiYgMBgQXMTYMziM/a4QXBgLvM+MBmcSiYIDkAXBHgQXI+cj+ciOQQABkMibIIXKAAMzmYqBDAUBkEAkRHKLQcgiBJB+bBBgZTBC5MvC4apBU4UAl53Lj4XCbYUCCYIzCC5RsBWwakCQYYXKAAUxBwMRYYUykUyC5swLwMBiESUQM/O5a/COwQYBAIIyBmAXLZ4IsBBoYABgUwBAYXHmUABogFCl4XL/8yiINESIMjNAIvLLoYWDQAYXLLoh1Ckc//7fBC5LUCC4gCBgUQBQoXFWYp1BRwIsBQAoXNn5JBNAgXHdgIAEiH/C4QAGC4kgEgsD+YHFAAYXEEY0v+QuIiMfa4gAh+cz/8z+c/AIIXQAQIVBAwQYQABI="))

29
apps/oblique/app.js Normal file
View File

@ -0,0 +1,29 @@
const strategies = ['Abandon normal instruments', 'Accept advice', 'Accretion', 'A line has two sides', 'Allow an easement (an easement is the abandonment of a stricture)', 'Are there sections? Consider transitions', 'Ask people to work against their better judgement', 'Ask your body', 'Assemble some of the instruments in a group and treat the group', 'Balance the consistency principle with the inconsistency principle', 'Be dirty', 'Breathe more deeply', 'Bridges -build -burn', 'Cascades', 'Change instrument roles', 'Change nothing and continue with immaculate consistency', "Children's voices -speaking -singing", 'Cluster analysis', 'Consider different fading systems', 'Consult other sources -promising -unpromising', 'Convert a melodic element into a rhythmic element', 'Courage!', 'Cut a vital connection', 'Decorate, decorate', "Define an area as `safe' and use it as an anchor", 'Destroy -nothing -the most important thing', 'Discard an axiom', 'Disconnect from desire', 'Discover the recipes you are using and abandon them', 'Distorting time', 'Do nothing for as long as possible', "Don't be afraid of things because they're easy to do", "Don't be frightened of cliches", "Don't be frightened to display your talents", "Don't break the silence", "Don't stress one thing more than another", 'Do something boring', 'Do the washing up', 'Do the words need changing?', 'Do we need holes?', 'Emphasize differences', 'Emphasize repetitions', 'Emphasize the flaws', 'Faced with a choice, do both (given by Dieter Rot)', 'Feedback recordings into an acoustic situation', 'Fill every beat with something', 'Get your neck massaged', 'Ghost echoes', 'Give the game away', 'Give way to your worst impulse', 'Go slowly all the way round the outside', 'Honor thy error as a hidden intention', 'How would you have done it?', 'Humanize something free of error', 'Imagine the music as a moving chain or caterpillar', 'Imagine the music as a set of disconnected events', 'Infinitesimal gradations', 'Intentions -credibility of -nobility of -humility of', 'Into the impossible', 'Is it finished?', 'Is there something missing?', 'Is the tuning appropriate?', 'Just carry on', 'Left channel, right channel, centre channel', 'Listen in total darkness, or in a very large room, very quietly', 'Listen to the quiet voice', 'Look at a very small object, look at its centre', 'Look at the order in which you do things', 'Look closely at the most embarrassing details and amplify them', 'Lowest common denominator check -single beat -single note -single', 'riff', 'Make a blank valuable by putting it in an exquisite frame', 'Make an exhaustive list of everything you might do and do the last', 'thing on the list', 'Make a sudden, destructive unpredictable action; incorporate', 'Mechanicalize something idiosyncratic', 'Mute and continue', 'Only one element of each kind', '(Organic) machinery', 'Overtly resist change', 'Put in earplugs', 'Remember those quiet evenings', 'Remove ambiguities and convert to specifics', 'Remove specifics and convert to ambiguities', 'Repetition is a form of change', 'Reverse', 'Short circuit (example: a man eating peas with the idea that they will', 'improve his virility shovels them straight into his lap)', 'Shut the door and listen from outside', 'Simple subtraction', 'Spectrum analysis', 'Take a break', 'Take away the elements in order of apparent non-importance', 'Tape your mouth (given by Ritva Saarikko)', 'The inconsistency principle', 'The tape is now the music', 'Think of the radio', 'Tidy up', 'Trust in the you of now', 'Turn it upside down', 'Twist the spine', 'Use an old idea', 'Use an unacceptable color', 'Use fewer notes', 'Use filters', 'Use "unqualified" people', 'Water', 'What are you really thinking about just now? Incorporate', 'What is the reality of the situation?', 'What mistakes did you make last time?', 'What would your closest friend do?', "What wouldn't you do?", 'Work at a different speed', 'You are an engineer', 'You can only make one dot at a time', "You don't have to be ashamed of using your own ideas", '[blank white card]']
const spentStrategies = []
function chooseObliqueness() {
const strategy = strategies[Math.floor(Math.random() * strategies.length)];
spentStrategies.push(strategy);
return strategy
}
// app intro
E.showMessage('oblique strategies\n\ncopied from\nbrian eno\n\nclick btn2');
setWatch(() => {
// beep!
Bangle.beep();
// get the strategy
const strategy = chooseObliqueness();
// configure font
g.setFontAlign(0,0);
// show the oblique strategy
E.showMessage(strategy.replace(/\s/g, '\n'));
// clear the screen
setTimeout(() => g.clear(), 10000);
}, BTN2, { repeat: true });

BIN
apps/oblique/eno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB