
Recherche avancée
Médias (1)
-
Carte de Schillerkiez
13 mai 2011, par
Mis à jour : Septembre 2011
Langue : English
Type : Texte
Autres articles (37)
-
Personnaliser les catégories
21 juin 2013, parFormulaire de création d’une catégorie
Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
On peut modifier ce formulaire dans la partie :
Administration > Configuration des masques de formulaire.
Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...) -
Changer son thème graphique
22 février 2011, parLe thème graphique ne touche pas à la disposition à proprement dite des éléments dans la page. Il ne fait que modifier l’apparence des éléments.
Le placement peut être modifié effectivement, mais cette modification n’est que visuelle et non pas au niveau de la représentation sémantique de la page.
Modifier le thème graphique utilisé
Pour modifier le thème graphique utilisé, il est nécessaire que le plugin zen-garden soit activé sur le site.
Il suffit ensuite de se rendre dans l’espace de configuration du (...) -
Automated installation script of MediaSPIP
25 avril 2011, parTo overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
The documentation of the use of this installation script is available here.
The code of this (...)
Sur d’autres sites (6367)
-
Problem importing whatsapp-web.js nodejs module in electron react app
26 mai 2021, par Sunil ShahI am trying to build an electron react app. I need to integrate this node modules https://www.npmjs.com/package/whatsapp-web.js in my electron react app. My main.js of electron looks like this :




// Modules to control application life and create native browser window
const { app, BrowserWindow } = require("electron");
const path = require("path");

function createWindow() {
 // Create the browser window.
 const mainWindow = new BrowserWindow({
 width: 800,
 height: 600,
 webPreferences: {
 webSecurity: false,
 },
 });

 // and load the index.html of the app.
 mainWindow.loadURL("your ip address:3000");

 // Open the DevTools.
 // mainWindow.webContents.openDevTools()
}

app.whenReady().then(() => {
 createWindow();

 app.on("activate", function () {
 // On macOS it's common to re-create a window in the app when the
 // dock icon is clicked and there are no other windows open.
 if (BrowserWindow.getAllWindows().length === 0) createWindow();
 });
});

// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on("window-all-closed", function () {
 if (process.platform !== "darwin") app.quit();
});

// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and require them here.







And the React code where i want to import whatsapp-web.js module looks like




import React from "react";
import styled from "styled-components";
const qrcode = require('qrcode-terminal');
const Client = require('whatsapp-web.js');
function Error() {
 var client = new Client();
 client.initialize();
 console.log(client);
 console.log(qrcode);
 return (
 <container>
 <errorimage src="https://cdn4.iconfinder.com/data/icons/smiley-vol-3-2/48/134-512.png"></errorimage>
 <errormessage>Oops, you are not connected to any number.</errormessage>
 </container>
 );
}

export default Error;

const Container = styled.div`
 display: flex;
 height: 100vh;
 width: 100%;
 padding-top: 20vh;
 position: center;
 /* align-items: center; */
 justify-content: center;
`;

const ErrorImage = styled.img`
 background-color: transparent;
 background-repeat: no-repeat;
 background-size: cover;
 object-fit: contain;

 width: 25%;
 height: 25%;

 /* border: 2px solid black; */
`;

const ErrorMessage = styled.div`
 margin: 10px;
 width: 50%;
 height: 25%;
 /* top: 20px; */
 font-size: 30px;
 align-items: center;
 font-family: "Lucida Console", "Courier New", monospace;
 /* font-weight: bold; */
`;







Now everytime I try to import const Client = require('whatsapp-web.js') It throws error like this :
**
[0] ./node_modules/fluent-ffmpeg/index.js
[0] Module not found : Can't resolve './lib-cov/fluent-ffmpeg' in 'D :\Sunil\Zarir_app-main\Zarir_app-main\node_modules\fluent-ffmpeg'
[0] Compiling...
[0] Failed to compile.


and I tried the solution
https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/issues/573#issuecomment-305408048
and other resources but still nothing works and just loops in errors and errors.
Please help if you have any information related to it.
Thank you.


-
How do I automate running a batch command with 3 arguments in C# (MVC 3) ?
13 janvier 2014, par kheyaI have this command in process.bat file
This file takes 3 arguments - %1 = input file path %2=output path %3=output file nameThis is how I call it in command prompt :
C:apps\xyz\>process.bat "c:\files\uploads" "c:\files\output" "123"
This creates 2 files : c :\files\output\abc.mp4 and c :\files\output\123.jpg using FFMPEG
Things work fine if I run in command prompt.@echo off
set w=480
set h=320
for "%%a" in ("%1\*.avi")
do (ffmpeg -i "%%a" -c:v libx264 -movflags +faststart -preset slow -crf 22 -b:v 500k -vf "scale=480:trunc(ow/a/2)*2" -threads 0 -c:a libfdk_aac -b:a 128k "%2/%%~na.mp4" -vf select="not(mod(n\\,10))" -r 1 -t 1 -ss 3 -s sqcif "%2\%3.jpg")But I need to automate this process. So I want a scheduled job or some other process that will process file periodically or when there are files to process.
I was thinking to create a C# Console app that will run every x minutes.
Console app will pass the 3 parameter to the bat file and run it.
But I am having nightmare with the console app. It just doesn't work.
I never see the files generated nor any error given.What will be the best practice to implement this automation in windows os (C#, MVC 3) ?
Here is what I tried that never worked :
public static string RunBatchFile(string fullPathToBatch, string args) {
using (var proc = new Process {
StartInfo =
{
FileName = fullPathToBatch,
Arguments = args,
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = false,
RedirectStandardError = false
}
})
{
try {
proc.Start();
proc.WaitForExit();
} catch (Win32Exception e) {
if (e.NativeErrorCode == 2)
return "File not found exception";
else if (e.NativeErrorCode == 5)
return "Access Denied Exception";
}
}
return "OK";
} -
ffmpeg code (API)
22 juin 2014, par user3209762I started to deal with ffmpeg API ( not the command prompt ) to build a movie editor, and I’m trying to find a good tutorial about how to extract keyframes from video, but I didn’t find it.
- Someone did it before and can write the code here ?
- Someone has a good tutorial about ffmpeg API ?
Thank you !