Created
December 3, 2013 14:09
-
-
Save jckermagoret/7769719 to your computer and use it in GitHub Desktop.
Imports data through bulk import system in Alfresco community/enterprise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# LICENSE | |
# @copyright BlueDolmen 2013 | |
# License Affero GPL | |
# Use at your own risks | |
# | |
# | |
# Imports content in Alfresco from filesystem through the use of bulk import system | |
# | |
LOGIN="admin" | |
PASSWD="admin" | |
HOST="localhost:8080" | |
getTicket () { | |
curl -v "http://$HOST/alfresco/service/api/login?u=$LOGIN&pw=$PASSWD" | |
}; | |
importContent () { | |
TICKET="TICKET_88e8978b4973801cd309ff8440fbdee49302b130" | |
PARAMS="alf_ticket=$TICKET" | |
PARAMS="$PARAMS&sourceDirectory=/data/repository/initial" | |
PARAMS="$PARAMS&contentStore=default" | |
PARAMS="$PARAMS&targetPath=/Company%20Home/Sites/winfich/documentLibrary" | |
PARAMS="$PARAMS&replaceExisting=false" | |
PARAMS="$PARAMS&batchSize=10" | |
PARAMS="$PARAMS&numThreads=10" | |
# | |
# Use only if using for an Alfresco Enterprise | |
# -X POST "http://$HOST/alfresco/service/bulkfsimport/inplace/initiate?$PARAMS" \n | |
echo curl -v | |
echo -X POST "http://$HOST/alfresco/service/bulkfsimport/initiate?$PARAMS" | |
echo -H "Content-type: text/html;charset=UTF-8" | |
echo | |
curl -v \ | |
-X POST "http://$HOST/alfresco/service/bulkfsimport/initiate?$PARAMS" \ | |
-H "Content-type: text/html;charset=UTF-8" | |
} | |
$* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment